Class AsciiUtil
java.lang.Object
pl.decerto.hyperon.runtime.helper.AsciiUtil
Fast method based on assumption that all characters are 7-bit ascii chars.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanequalsIgnoreCase(char c1, char c2) fast compare 7-bit charsstatic booleanequalsIgnoreCase(String s1, String s2) fast compare 7-bit stringsstatic booleanisUppercaseLetter(char c) is [c] valid 7-bit upper letterstatic Stringreturn lower cased [str] method is on average 2 times faster than String.toLowerCase()
-
Method Details
-
equalsIgnoreCase
fast compare 7-bit strings- Parameters:
s1- not nulls2- not null- Returns:
- boolean value from compare result
-
equalsIgnoreCase
public static boolean equalsIgnoreCase(char c1, char c2) fast compare 7-bit chars- Parameters:
c1- not nullc2- not null- Returns:
- boolean value from compare result
-
isUppercaseLetter
public static boolean isUppercaseLetter(char c) is [c] valid 7-bit upper letter- Parameters:
c- not null- Returns:
- boolean value from compare result
-
lowercase
return lower cased [str] method is on average 2 times faster than String.toLowerCase()- Parameters:
str- String value- Returns:
- lower cased [str]
-