convert string separated by underscore To Title Case - Android java.lang

Android examples for java.lang:String Case

Description

convert string separated by underscore To Title Case

Demo Code


public class Main{

    public static String convertToTitleCase(String input) {
        String[] parts = input.split("_");
        String camelCaseString = "";
        for (String part : parts) {
            camelCaseString = camelCaseString + toProperCase(part);
        }//w w w.ja  v a 2  s . co m
        return camelCaseString;
    }

}

Related Tutorials