Here you can find the source of toCamelCase(String input)
public static String toCamelCase(String input)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w ww . j a v a2s. c o m*/ * Transform a dashed input into camelcased */ public static String toCamelCase(String input) { String newinput = ""; for (int i = 0; i < input.length(); i++) { char theChar = input.charAt(i); if (theChar == '-') { newinput += input.substring(i + 1, i + 2).toUpperCase(); i += 1; } else { newinput += theChar; } } return newinput; } }