Java String Camel Case Format toCamelCase(String name)

Here you can find the source of toCamelCase(String name)

Description

to Camel Case

License

Open Source License

Declaration

public static String toCamelCase(String name) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String toCamelCase(String name) {
        return toCamelCase(name.split("_"));
    }/*from   w  w  w  . j av a2 s. c  o m*/

    public static String toCamelCase(String[] parts) {
        StringBuilder buff = new StringBuilder();
        for (String part : parts) {
            if (part.isEmpty()) {
                continue;
            }
            buff.append(Character.toUpperCase(part.charAt(0)));
            buff.append(part.substring(1));
        }
        return buff.toString();
    }
}

Related

  1. toCamelCase(String input, boolean capitalizeFirsLetter)
  2. toCamelCase(String input, boolean firstCharUppercase, char separator)
  3. toCamelCase(String inputString)
  4. toCamelCase(String inputString)
  5. toCamelCase(String name)
  6. toCamelCase(String name)
  7. toCamelCase(String name)
  8. toCamelCase(String name)
  9. toCamelCase(String name)