This module contains a set of methods for testing various
properties of <character> this
will work 100% correctly only with ASCII English characters.
Fixing this so it handles Unicode better would be a good way
of covering yourself with glory, hint hint.
alphabetic? | [Function] |
#t if the character is in [a-zA-Z].Synopsis
alphabetic? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is alphabetic,#fotherwise.
digit? | [Function] |
#t if the character is a numeric digit [0-9].Synopsis
digit? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a digit,#fotherwise.
alphanumeric? | [Function] |
#t if the character is alphabetic or a digit.Synopsis
alphanumeric? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is alphanumeric,#fotherwise.
whitespace? | [Function] |
#t if the character is whitespace.Synopsis
whitespace? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is whitespace (space, tab, linefeed, or newline),#fotherwise.
lowercase? | [Function] |
#t if the character is in [a-z].Synopsis
lowercase? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is lowercase (in [a-z]),#fotherwise.
hex-digit? | [Function] |
#t if the character is a hexadecimal digit.Synopsis
hex-digit? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a hexadecimal digit; that is, if it is in [0-9], [a-f] or [A-F],#fotherwise.
graphic? | [Function] |
#t if the character is a graphic character.Synopsis
graphic? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a printing, non-whitespace character,#fotherwise.
printable? | [Function] |
#t if the character is printable.Synopsis
printable? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a printing character,#fotherwise.
punctuation? | [Function] |
#t if the character is punctuation.Synopsis
punctuation? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a graphic, non-alphanumeric character,#fotherwise.
control? | [Function] |
#t if the character is not printable.Synopsis
control? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a control character,#fotherwise.
byte-character? | [Function] |
#t if the character is an ASCII character. Could be flaky.Synopsis
byte-character? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is a byte-character (which is if the integer value of the character returns less than 256. I don't know enough about Unicode and character set encodings to say what this means),#fotherwise.
uppercase? | [Function] |
#t if the character is uppercase.Synopsis
uppercase? (character) => (answer)
Parameters
characterAn instance of <character>Returns
answerAn instance of <boolean>Description
Returns#tif the character is in [A-Z],#fotherwise.