Android examples for java.lang:String Case
Convert String to camel Case To Words
import java.util.List; import java.util.Map; public class Main{ public static String camelCaseToWords(String string) { if (IsNullOrEmpty(string)) return string; StringBuilder result = new StringBuilder(string.length()); result.append(Character.toUpperCase(string.charAt(0))); for (int i = 1; i < string.length(); ++i) { char chr = string.charAt(i); if (Character.isUpperCase(chr)) { result.append(' '); }//from w w w . j a v a 2 s . c o m result.append(chr); } return result.toString(); } }