Java Utililty Methods String Camel Case

List of utility methods to do String Camel Case

Description

The list of methods to do String Camel Case are organized into topic(s).

Method

Stringcamelize(String s)
camelize
return Character.toLowerCase(s.charAt(0)) + s.substring(1);
Stringcamelize(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("_", "");
Stringcamelize(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());
...
Stringcamelize(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) {
...