Java Utililty Methods String Upper Case

List of utility methods to do String Upper Case

Description

The list of methods to do String Upper Case are organized into topic(s).

Method

StringtoUpperCaseUnderscore(String text)
to Upper Case Underscore
text = text.toUpperCase().trim();
text = text.replace(WHITESPACE, "_");
return text;
StringtoUpperCaseWithUnderscores(String className)
to Upper Case With Underscores
StringBuilder sb = new StringBuilder();
for (char c : className.toCharArray()) {
    if (c >= 'A' && c <= 'Z' && sb.length() > 0) {
        sb.append('_').append(c);
    } else {
        sb.append(Character.toUpperCase(c));
return sb.toString();
StringtoUpperCaseWithUnderscores(String str)
to Upper Case With Underscores
return null;