Here you can find the source of camelCase(String in)
public static String camelCase(String in)
//package com.java2s; //License from project: Apache License public class Main { public static String camelCase(String in) { String s = ""; String[] split = in.replace('_', ' ').split(" "); for (int i = 0; i < split.length; i++) { if (i == 0) s += split[i].toLowerCase(); else/*from w w w. j a v a 2 s.c o m*/ s += split[i].substring(0, 1).toUpperCase() + split[i].substring(1).toLowerCase(); } return s; } }