List of utility methods to do String Decapitalize
String | decapitalize(String s) decapitalize int len = s.length(); if (len == 0) return s; else if (len == 1) return Character.toLowerCase(s.charAt(0)) + ""; else return Character.toLowerCase(s.charAt(0)) + s.substring(1); |
String | decapitalize(String s) Decapitalize a string using java bean conventions. char[] c = s.toCharArray(); c[0] = toLowerCase(c[0]); return new String(c); |
String | decapitalize(String st) Decapitalize String if (st.length() == 0) return st; return st.substring(0, 1).toLowerCase() + st.substring(1); |
String | decapitalize(String str) decapitalize if (isEmpty(str)) return str; char cs[] = str.toCharArray(); if (cs.length >= 2 && Character.isUpperCase(cs[0]) && Character.isUpperCase(cs[1])) return str; cs[0] = Character.toLowerCase(cs[0]); return new String(cs); |
String | decapitalize(String string) Decapitalize a String if it begins with a capital letter, e.g.: FooBar -> fooBar char c0 = string.charAt(0); if (!Character.isUpperCase(c0)) { return string; if (string.length() > 1 && Character.isUpperCase(string.charAt(1))) { return string; char[] chars = string.toCharArray(); ... |
String | decapitalize(String string) Lowers the first letter of a String. if (isEmpty(string)) return (string); if (string.length() == 1) return (string.toLowerCase()); return (string.substring(0, 1).toLowerCase() + string.substring(1, string.length())); |
String | decapitalize(String string) Return (possibly copy of) given string with first character lower case. if (Character.isLowerCase(string.charAt(0))) return string; char chars[] = string.toCharArray(); chars[0] = Character.toLowerCase(chars[0]); return new String(chars); |
String | decapitalize(String string) decapitalize if (string == null || string.isEmpty()) { return string; String dec = string.substring(0, 1).toLowerCase(); if (string.length() > 1) { dec += string.substring(1); return dec; ... |
String | decapitalize(String string) Helper method. return Character.toLowerCase(string.charAt(0)) + string.substring(1);
|
String | decapitalize(String text) decapitalize if (isNullOrEmpty(text)) { return text; char chars[] = text.toCharArray(); chars[0] = Character.toLowerCase(chars[0]); return new String(chars); |