MCPcopy Create free account
hub / github.com/TheAlgorithms/Java / toLowerCase

Method toLowerCase

src/main/java/com/thealgorithms/strings/Lower.java:23–31  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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}

Callers 15

toLowerCaseMethod · 0.95
mainMethod · 0.95
isPangramUsingSetMethod · 0.45
isPangram2Method · 0.45
hasVowelsMethod · 0.45
charEqualsMethod · 0.45
toTitleCaseMethod · 0.45
isAlphabeticIsogramMethod · 0.45
isFullIsogramMethod · 0.45
isAlphabeticalMethod · 0.45
areAnagramsBySortingMethod · 0.45

Calls

no outgoing calls

Tested by 1

toLowerCaseMethod · 0.76