List of utility methods to do String Camel Case
String | camelCase(CharSequence... components) camel Case StringBuilder sb = new StringBuilder(); boolean start = true; for (CharSequence comp : components) { if (comp != null && comp.length() == 0) { if (start) { sb.append(comp); start = false; } else { ... |
String | camelCase(final String input) camel Case if (input.contains(" ")) { final String[] strings = input.split(" "); final StringBuilder sb = new StringBuilder(); for (final String s : strings) { sb.append(s.substring(0, 1).toLowerCase()).append(s.substring(1).toLowerCase()).append(" "); return sb.toString(); return input.substring(0, 1).toLowerCase() + input.substring(1).toLowerCase(); |
String | camelCase(final String prefix, final String str) camel Case return prefix.toLowerCase() + str.substring(0, 1).toUpperCase() + str.substring(1).toLowerCase();
|
String | camelCase(final String text) camel Case if (text == null) { throw new IllegalArgumentException("text"); for (final String acronym : ACRONYMS) { if (acronym.equals(text)) { return text; for (final String acronym : ACRONYMS) { if (text.startsWith(acronym)) { return acronym.toLowerCase().concat(text.substring(acronym.length())); return text.substring(0, 1).toLowerCase().concat(text.substring(1)); |
String | camelCase(final String value, final String delim) converts string to camel case, using the specified string delimeter if (value == null || value.isEmpty()) { return ""; final StringBuilder result = new StringBuilder(value.length()); final String[] parts = value.split(delim); if (parts != null && parts.length > 0) { boolean mustCapitalize = false; for (final String part : parts) { ... |
String | camelCase(String column) camel Case StringBuffer newColumn = new StringBuffer(); boolean underScoreFound = false; int index = -1; int currentPosition = 0; while ((index = column.indexOf('_', currentPosition)) > -1) { newColumn.append(column.substring(currentPosition, index).toLowerCase()); newColumn.append(column.substring(index + 1, index + 2).toUpperCase()); currentPosition = index + 2; ... |
String | camelCase(String content) Converts `string` to [camel case] StringBuilder result = new StringBuilder(); int i = 0; for (String word : content.replaceAll("[^a-zA-Z0-9]", " ").split(NATURAL_TEXT_SPLITTER)) { word = word.toLowerCase(); if (i == 0) { result.append(word); } else { result.append(firstUpper(word)); ... |
String | camelCase(String in) Camel case anY STRING given as InPuT. returns : CamelCaseAnyStringGivenAsInput. return removeWhiteSpaces(capitalize(in.toLowerCase(), true));
|
String | camelCase(String in) camel Case String s = ""; String[] split = in.replace('_', ' ').split(" "); for (int i = 0; i < split.length; i++) { if (i == 0) s += split[i].toLowerCase(); else s += split[i].substring(0, 1).toUpperCase() + split[i].substring(1).toLowerCase(); return s; |
String | camelCase(String input) camel Case return input.substring(0, 1).toLowerCase() + input.substring(1);
|