Here you can find the source of underscoreDashToCamelCase(String s)
public static String underscoreDashToCamelCase(String s)
//package com.java2s; //License from project: Open Source License public class Main { public static String underscoreDashToCamelCase(String s) { String[] parts = s.split("[_-]"); StringBuilder builder = new StringBuilder(); for (String part : parts) { builder.append(capitalized(part)); }//from www .j a va 2 s . c o m return builder.toString(); } public static String capitalized(String s) { return s.substring(0, 1).toUpperCase() + s.substring(1); } }