I can't seem to get StringUtils.capitalize to actually capitalize my whole word string.
I've tried various ways, but I just end up getting sentence-type case. I tried using StringUtils.capitalize inside of what I want to print, but that doesn't work either. Nothing I look up helps me either.
File file =
new File("C:\\Users\\mikek\\Desktop\\name.txt");
BufferedReader abc = new BufferedReader(new FileReader(file));
List<String> data = new ArrayList<String>();
String s;
String t;
while((s=abc.readLine()!=null) {
data.add(s);
System.out.println("public static final Block " + s.toUpperCase() + " = new "
+ StringUtils.capitalize(s).replace("_","") + "(\"" + s + "\", Material.ROCK);");
}
abc.close();
}
Expected: Charcoal Block Got: Charcoal block