List of utility methods to do String Upper Case
String | toUpperCase(String src) Safely convert the string to uppercase. if (src == null) { return null; } else { return src.toUpperCase(); |
String | toUpperCase(String str) to Upper Case int len = str.length(); char c; for (int i = 0; i < len; i++) { c = str.charAt(i); if (!((c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9'))) { return str.toUpperCase(); return str; |
String | toUpperCase(String str) to Upper Case String newStr = convertBasicLatinToUpper(str); if (newStr == null) { return str.toUpperCase(); return newStr; |
String | toUpperCase(String str) Non-localized version, be careful if (str != null) { return str.toUpperCase(); return null; |
String | toUpperCase(String str) to Upper Case StringBuffer buffer = new StringBuffer(str); for (int i = 0; i < buffer.length(); i++) { char c = buffer.charAt(i); buffer.setCharAt(i, Character.toUpperCase(c)); return buffer.toString(); |
String | toUpperCase(String string) A locale independent version of toUpperCase. boolean changed = false; char[] chars = string.toCharArray(); for (int i = 0; i != chars.length; i++) { char ch = chars[i]; if ('a' <= ch && 'z' >= ch) { changed = true; chars[i] = (char) (ch - 'a' + 'A'); if (changed) { return new String(chars); return string; |
String | toUpperCase(String string) Makes sure that the first character in a string is upper case. return Character.toString(string.charAt(0)).toUpperCase() + string.substring(1);
|
String | toUpperCase(String text) to Upper Case if (text == null) { return null; } else { return text.toUpperCase(); |
String | toUpperCase(String text) to upper case like XXX_XXX_XXX if (text != null && text.length() > 0) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < text.length(); i++) { char c = text.charAt(i); if (i != 0 && Character.isUpperCase(c)) { sb.append("_"); sb.append(Character.toUpperCase(c)); ... |
String | toUpperCase(String text) to Upper Case if (text != null) { int len = text.length(); if (len > 0) { char[] buf = new char[len]; for (int i = 0; i < len; i++) { buf[i] = Character.toUpperCase(text.charAt(i)); text = new String(buf); ... |