MCPcopy Create free account
hub / github.com/antlr/codebuff / toLowerCase

Method toLowerCase

output/java_guava/1.4.13/Ascii.java:445–460  ·  view source on GitHub ↗

Returns a copy of the input string in which all plain #isUpperCase(char) uppercase ASCII characters have been converted to lowercase. All other characters are copied without modification.

(String string)

Source from the content-addressed store, hash-verified

443 */
444
445 public static String toLowerCase(String string) {
446 int length = string.length();
447 for (int i = 0; i < length; i++) {
448 if (isUpperCase(string.charAt(i))) {
449 char[] chars = string.toCharArray();
450 for (; i < length; i++) {
451 char c = chars[i];
452 if (isUpperCase(c)) {
453 chars[i] = (char) (c ^ 0x20);
454 }
455 }
456 return String.valueOf(chars);
457 }
458 }
459 return string;
460 }
461
462 /**
463 * Returns a copy of the input character sequence in which all {@linkplain #isUpperCase(char)

Callers 5

toStringMethod · 0.95
normalizeWordMethod · 0.95
convertMethod · 0.95
normalizeFirstWordMethod · 0.95
firstCharOnlyToUpperMethod · 0.95

Calls 6

isUpperCaseMethod · 0.95
toStringMethod · 0.65
lengthMethod · 0.45
toCharArrayMethod · 0.45
valueOfMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected