Here you can find the source of toCamelCase(String string)
Parameter | Description |
---|---|
string | the string to change to camel case |
public static String toCamelCase(String string)
//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(); } }