Example usage for Java org.apache.commons.lang3 CharUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
boolean | isAscii(final char ch) Checks whether the character is ASCII 7 bit. CharUtils.isAscii('a') = true CharUtils.isAscii('A') = true CharUtils.isAscii('3') = true CharUtils.isAscii('-') = true CharUtils.isAscii('\n') = true CharUtils.isAscii('©') = false |
boolean | isAsciiAlpha(final char ch) Checks whether the character is ASCII 7 bit alphabetic. CharUtils.isAsciiAlpha('a') = true CharUtils.isAsciiAlpha('A') = true CharUtils.isAsciiAlpha('3') = false CharUtils.isAsciiAlpha('-') = false CharUtils.isAsciiAlpha('\n') = false CharUtils.isAsciiAlpha('©') = false |
boolean | isAsciiAlphaLower(final char ch) Checks whether the character is ASCII 7 bit alphabetic lower case. CharUtils.isAsciiAlphaLower('a') = true CharUtils.isAsciiAlphaLower('A') = false CharUtils.isAsciiAlphaLower('3') = false CharUtils.isAsciiAlphaLower('-') = false CharUtils.isAsciiAlphaLower('\n') = false CharUtils.isAsciiAlphaLower('©') = false |
boolean | isAsciiAlphanumeric(final char ch) Checks whether the character is ASCII 7 bit numeric. CharUtils.isAsciiAlphanumeric('a') = true CharUtils.isAsciiAlphanumeric('A') = true CharUtils.isAsciiAlphanumeric('3') = true CharUtils.isAsciiAlphanumeric('-') = false CharUtils.isAsciiAlphanumeric('\n') = false CharUtils.isAsciiAlphanumeric('©') = false |
boolean | isAsciiAlphaUpper(final char ch) Checks whether the character is ASCII 7 bit alphabetic upper case. CharUtils.isAsciiAlphaUpper('a') = false CharUtils.isAsciiAlphaUpper('A') = true CharUtils.isAsciiAlphaUpper('3') = false CharUtils.isAsciiAlphaUpper('-') = false CharUtils.isAsciiAlphaUpper('\n') = false CharUtils.isAsciiAlphaUpper('©') = false |
boolean | isAsciiControl(final char ch) Checks whether the character is ASCII 7 bit control. CharUtils.isAsciiControl('a') = false CharUtils.isAsciiControl('A') = false CharUtils.isAsciiControl('3') = false CharUtils.isAsciiControl('-') = false CharUtils.isAsciiControl('\n') = true CharUtils.isAsciiControl('©') = false |
boolean | isAsciiNumeric(final char ch) Checks whether the character is ASCII 7 bit numeric. CharUtils.isAsciiNumeric('a') = false CharUtils.isAsciiNumeric('A') = false CharUtils.isAsciiNumeric('3') = true CharUtils.isAsciiNumeric('-') = false CharUtils.isAsciiNumeric('\n') = false CharUtils.isAsciiNumeric('©') = false |
boolean | isAsciiPrintable(final char ch) Checks whether the character is ASCII 7 bit printable. CharUtils.isAsciiPrintable('a') = true CharUtils.isAsciiPrintable('A') = true CharUtils.isAsciiPrintable('3') = true CharUtils.isAsciiPrintable('-') = true CharUtils.isAsciiPrintable('\n') = false CharUtils.isAsciiPrintable('©') = false |
char | toChar(final Character ch) Converts the Character to a char throwing an exception for null . CharUtils.toChar(' ') = ' ' CharUtils.toChar('A') = 'A' CharUtils.toChar(null) throws IllegalArgumentException |
char | toChar(final String str) Converts the String to a char using the first character, throwing an exception on empty Strings. CharUtils.toChar("A") = 'A' CharUtils.toChar("BA") = 'B' CharUtils.toChar(null) throws IllegalArgumentException CharUtils.toChar("") throws IllegalArgumentException |
int | toIntValue(final char ch) Converts the character to the Integer it represents, throwing an exception if the character is not numeric. This method coverts the char '1' to the int 1 and so on. CharUtils.toIntValue('3') = 3 CharUtils.toIntValue('A') throws IllegalArgumentException |
int | toIntValue(final Character ch) Converts the character to the Integer it represents, throwing an exception if the character is not numeric. This method coverts the char '1' to the int 1 and so on. CharUtils.toIntValue('3') = 3 CharUtils.toIntValue(null) throws IllegalArgumentException CharUtils.toIntValue('A') throws IllegalArgumentException |
String | toString(final char ch) Converts the character to a String that contains the one character. For ASCII 7 bit characters, this uses a cache that will return the same String object each time. CharUtils.toString(' ') = " " CharUtils.toString('A') = "A" |
String | toString(final Character ch) Converts the character to a String that contains the one character. For ASCII 7 bit characters, this uses a cache that will return the same String object each time. If null is passed in, null will be returned. CharUtils.toString(null) = null CharUtils.toString(' ') = " " CharUtils.toString('A') = "A" |