Here you can find the source of toCamelCase(String input)
public static String toCamelCase(String input)
//package com.java2s; /******************************************************************************* * Copyright (c) 2015 SAP and others.// w w w . j a va2 s. c o m * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * Contributors: * SAP - initial API and implementation *******************************************************************************/ public class Main { public static String toCamelCase(String input) { if (input == null) { return null; } StringBuffer result = new StringBuffer(); result.append(input.substring(0, 1).toUpperCase()); result.append(input.substring(1).toLowerCase()); return result.toString(); } }