public static String toUpperCaseAndSplitWithSpace(String str) {
String result = "";
String to = CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, str);
char[] chars = to.toCharArray();
for (int i = 0; i < chars.length; i++) {
if (chars[i] >= 65 && chars[i] <= 91) {
if (i != 1) {
result += " ";
}
}
result += chars[i];
}
if (!StringUtils.isEmpty(str)) {
result = result.replaceAll("^[ ]+", "");
}
return result;
}


