Package com.github.tommyettinger.ds
Class Casing
java.lang.Object
com.github.tommyettinger.ds.Casing
This mostly-internal class only exists to help case-insensitive comparisons and hashing.
It stores a massive char array in source code that contains transforms of every Java char
after calling
Character.toUpperCase(char). This data is only accessible via
caseUp(char). There is no and will be no caseDown() unless we find we need it
for case-insensitive code of some kind.-
Method Summary
Modifier and TypeMethodDescriptionstatic charcaseUp(char c) Gets what would be the result of callingCharacter.toUpperCase(char)onc, but works identically on all platforms, and should be very fast.
-
Method Details
-
caseUp
public static char caseUp(char c) Gets what would be the result of callingCharacter.toUpperCase(char)onc, but works identically on all platforms, and should be very fast.- Parameters:
c- any char- Returns:
c, transformed to upper case if possible or left the same if not.
-