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

Method toLowerCase

output/java_guava/1.4.18/Ascii.java:406–421  ·  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

404 * modification.
405 */
406 public static String toLowerCase(String string) {
407 int length = string.length();
408 for (int i = 0; i < length; i++) {
409 if (isUpperCase(string.charAt(i))) {
410 char[] chars = string.toCharArray();
411 for (; i < length; i++) {
412 char c = chars[i];
413 if (isUpperCase(c)) {
414 chars[i] = (char) (c ^ 0x20);
415 }
416 }
417 return String.valueOf(chars);
418 }
419 }
420 return string;
421 }
422
423 /**
424 * Returns a copy of the input character sequence in which all {@linkplain #isUpperCase(char)

Callers 11

toStringMethod · 0.95
toStringMethod · 0.95
lowerCaseMethod · 0.95
normalizeWordMethod · 0.95
convertMethod · 0.95
normalizeFirstWordMethod · 0.95
firstCharOnlyToUpperMethod · 0.95
MediaTypeClass · 0.95
normalizeTokenMethod · 0.95
InternetDomainNameMethod · 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