List of utility methods to do String Camel Case
String | camelize(String s) camelize return Character.toLowerCase(s.charAt(0)) + s.substring(1);
|
String | camelize(String underScore) camelize char[] str = underScore.toCharArray(); for (int i = 0; i < str.length - 1; ++i) { if (str[i] == '_') { str[i + 1] = toUpperCase(str[i + 1]); return new String(str).replaceAll("_", ""); |
String | camelize(String value) camelize if ((value == null) || (value.length() == 0)) { return value; if (value.indexOf("-") == -1) { return value; String[] tokens = value.split("-"); StringBuffer newValue = new StringBuffer(tokens[0].toLowerCase()); ... |
String | camelize(String value) camelize if (value == null) { return null; String[] tokens = value.split("_"); StringBuilder camelized = new StringBuilder(value.length()); for (String token : tokens) { for (int i = 0; i < token.length(); i++) { if (i == 0) { ... |