List of utility methods to do String Camel Case
String | camelify(String original) camelify if (original == null) return ""; StringBuilder builder = new StringBuilder(); Pattern p = Pattern.compile("[a-zA-Z0-9]+"); Matcher m = p.matcher(original); String word; while (m.find()) { word = m.group(); ... |
String | decamelize(final String s) decamelize if (s == null) { return null; if (s.length() == 1) { return s.toUpperCase(); StringBuffer buf = new StringBuffer(40); int pos = 0; ... |
String | snakify(String original) snakify if (original == null || original.length() == 0) return ""; StringBuilder builder = new StringBuilder(); Pattern p = Pattern.compile("[A-Z][a-z0-9]+"); Matcher m = p.matcher(original); String word; while (m.find()) { word = m.group(); ... |