List of utility methods to do String Upper Case
String | toUpperCaseFirstOne(String origin) to Upper Case First One StringBuffer sb = new StringBuffer(origin); sb.setCharAt(0, Character.toUpperCase(sb.charAt(0))); sb.insert(0, "get"); return sb.toString(); |
String | toUpperCaseFirstOne(String s) to Upper Case First One if (Character.isUpperCase(s.charAt(0))) return s; else return (new StringBuilder()).append(Character.toUpperCase(s.charAt(0))).append(s.substring(1)) .toString(); |
String | toUpperCaseHead(String str) to Upper Case Head if (str.length() == 0) return str; return str.substring(0, 1).toUpperCase() + str.substring(1); |
String | toUppercaseHeadCharactor(String str) to Uppercase Head Charactor StringBuffer sb = new StringBuffer(); sb.append(str.substring(0, 1).toUpperCase()); sb.append(str.substring(1).toLowerCase()); return sb.toString(); |
String | toUpperCaseIdent(String ident) to Upper Case Ident return Character.toUpperCase(ident.charAt(0)) + ident.substring(1);
|
String | toUpperCaseName(String s) to Upper Case Name String res; res = s.replaceAll("\\s*&\\s*|\\s* \\s*", "-"); res = res.replaceAll("\\s*\\W+\\s*|\\s+", "-"); res = res.replaceAll("^-+|-+$", ""); return res.toUpperCase(); |
String | toUpperCaseNamespace(String string) to Upper Case Namespace String[] path = string.split("[.]"); String type = ""; for (int i = 0; i < path.length; i++) { if (i != path.length - 1) { if (path[i].equals("loopheader")) path[i] = "loopHeader"; else if (path[i].equals("completionevents")) path[i] = "completionEvents"; ... |
String | toUppercaseNoAccents(String txt) to Uppercase No Accents if (txt == null) { return null; String txtUpper = txt.toUpperCase(); StringBuilder sb = new StringBuilder(); int n = txtUpper.length(); for (int i = 0; i < n; i++) { char c = txtUpper.charAt(i); ... |
String | toUpperCaseNotation(String camelNotation) to Upper Case Notation StringBuilder sb = new StringBuilder(camelNotation.length() + 10); boolean change = true; for (int i = 0; i < camelNotation.length(); i++) { char c = camelNotation.charAt(i); change = !change && Character.isUpperCase(c); if (change) { sb.append('_'); sb.append(Character.toUpperCase(c)); change = Character.isUpperCase(c); return sb.toString(); |
String | toUpperCaseOfFirstChar(String string) to Upper Case Of First Char if (string == null || string.trim().equals("")) { return ""; } else { string = string.trim(); String firstChar = string.substring(0, 1).toUpperCase(); string = firstChar + string.substring(1); return string; ... |