Java String Camel Case Format toCamelCase(String string)

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

Description

Get a camel case version of a string

License

LGPL

Parameter

Parameter Description
string the string to change to camel case

Return

the specified string in camel case

Declaration

public static String toCamelCase(String string) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    /**/* w  w w .  j  a  v a 2 s . c o m*/
     * Get a camel case version of a string
     * @param string the string to change to camel case
     * @return the specified string in camel case
     */
    public static String toCamelCase(String string) {
        return string.substring(0, 1).toUpperCase() + string.substring(1).toLowerCase();
    }
}

Related

  1. toCamelCase(String str, boolean firstCapital)
  2. toCamelCase(String string)
  3. toCamelCase(String string)
  4. toCamelCase(String string)
  5. toCamelCase(String string)
  6. toCamelCase(String string)
  7. toCamelCase(String stringValue, String delimiter)
  8. toCamelCase(String text)
  9. toCamelCase(String text)