java.lang.Object
io.helidon.common.buffers.Ascii
Extracted from Guava.
Static methods pertaining to ASCII characters (those in the range of values 0x00
through
0x7F
), and to strings containing such characters.
original author Craig Berry
original author Gregory Kick
original since 7.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isLowerCase
(char c) Indicates whetherc
is one of the twenty-six lowercase ASCII alphabetic characters between'a'
and'z'
inclusive.static boolean
isUpperCase
(char c) Indicates whetherc
is one of the twenty-six uppercase ASCII alphabetic characters between'A'
and'Z'
inclusive.static char
toLowerCase
(char c) If the argument is an uppercase ASCII character returns the lowercase equivalent.static String
toLowerCase
(CharSequence chars) Returns a copy of the input character sequence in which all uppercase ASCII characters have been converted to lowercase.static String
toLowerCase
(String string) Returns a copy of the input string in which all uppercase ASCII characters have been converted to lowercase.static char
toUpperCase
(char c) If the argument is a lowercase ASCII character returns the uppercase equivalent.static String
toUpperCase
(CharSequence chars) Returns a copy of the input character sequence in which all lowercase ASCII characters have been converted to uppercase.static String
toUpperCase
(String string) Returns a copy of the input string in which all lowercase ASCII characters have been converted to uppercase.
-
Method Details
-
toLowerCase
Returns a copy of the input string in which all uppercase ASCII characters have been converted to lowercase. All other characters are copied without modification.- Parameters:
string
- string to lower case- Returns:
- lower cased string
-
toUpperCase
Returns a copy of the input character sequence in which all lowercase ASCII characters have been converted to uppercase. All other characters are copied without modification.- Parameters:
chars
- character sequence to upper case- Returns:
- uppercase case value original since 14.0
-
toUpperCase
Returns a copy of the input string in which all lowercase ASCII characters have been converted to uppercase. All other characters are copied without modification.- Parameters:
string
- string to upper case- Returns:
- upper cased string
-
toLowerCase
Returns a copy of the input character sequence in which all uppercase ASCII characters have been converted to lowercase. All other characters are copied without modification.- Parameters:
chars
- character sequence to lower case- Returns:
- lower case value original since 14.0
-
toLowerCase
public static char toLowerCase(char c) If the argument is an uppercase ASCII character returns the lowercase equivalent. Otherwise returns the argument.- Parameters:
c
- character- Returns:
- character as a lower case
-
isLowerCase
public static boolean isLowerCase(char c) Indicates whetherc
is one of the twenty-six lowercase ASCII alphabetic characters between'a'
and'z'
inclusive. All others (including non-ASCII characters) returnfalse
.- Parameters:
c
- character to check- Returns:
- whether the character is lower case
-
toUpperCase
public static char toUpperCase(char c) If the argument is a lowercase ASCII character returns the uppercase equivalent. Otherwise returns the argument.- Parameters:
c
- character- Returns:
- character as a lower case
-
isUpperCase
public static boolean isUpperCase(char c) Indicates whetherc
is one of the twenty-six uppercase ASCII alphabetic characters between'A'
and'Z'
inclusive. All others (including non-ASCII characters) returnfalse
.- Parameters:
c
- character to check- Returns:
- whether the character is upper case
-