char
isAlphabetic
isAlphabetic(ch)Detect a character whether it is one of a-z or A-Z.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isAlphabetic('a');
// => true
isAlphabetic('1');
// => falseisAlphanumeric
isAlphanumeric(ch)Detect a character whether it is one of a-z or A-Z or 0-9.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isAlphanumeric('a');
// => true
isAlphanumeric('1');
// => true
isAlphanumeric('*');
// => falseisASCII
isASCII(ch)Detect a character whether it is an ASCII character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isASCII('a');
// => true
isASCII('1');
// => true
isASCII('你');
// => falseisCJK
isCJK(ch)Detect a character whether it is a CJK (Chinese, Japanese and Korean) character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isCJK('你');
// => true
isCJK('の');
// => trueisControl
isControl(ch)Detect a character whether it is a control character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isControl('\t');
// => true
isControl('\r');
// => trueisDigit
isDigit(ch)Detect a character whether it is a decimal digit (0-9).
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isDigit('0');
// => true
isDigit('1');
// => trueisGraph
isGraph(ch)Detect a character whether it is a graphic character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isGraph('0');
// => true
isGraph('a');
// => trueisHexadecimal
isHexadecimal(ch)Detect a character whether it is a hexadecimal character (0-9, a-f, A-F).
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isHexadecimal('0');
// => true
isHexadecimal('a');
// => true
isHexadecimal('A');
// => trueisLower
isLower(ch)Detect a character whether it is a lower-case character (a-z).
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isLower('a');
// => trueisPrint
isPrint(ch)Detect a character whether it is a printable character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isPrint('a');
// => trueisPunctuation
isPunctuation(ch)Detect a character whether it is a punctuation character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isPunctuation(',');
// => trueisSpace
isSpace(ch)Detect a character whether it is a space character.
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isSpace(' ');
// => trueisUpper
isUpper(ch)Detect a character whether it is a upper-case character (A-Z).
Since
0.1.0
Arguments
ch (string): A string with length equal to 1.
Return
(boolean)
Example
isUpper('a');
// => true