Converts all of the characters in this String to lower case @param s the string to convert @return the String, converted to lowercase.
(String s)
| 21 | * @return the {@code String}, converted to lowercase. |
| 22 | */ |
| 23 | public static String toLowerCase(String s) { |
| 24 | char[] values = s.toCharArray(); |
| 25 | for (int i = 0; i < values.length; ++i) { |
| 26 | if (Character.isLetter(values[i]) && Character.isUpperCase(values[i])) { |
| 27 | values[i] = Character.toLowerCase(values[i]); |
| 28 | } |
| 29 | } |
| 30 | return new String(values); |
| 31 | } |
| 32 | } |
no outgoing calls