is_char


is_char(obj)
      

Return true if obj is a character, otherwise return false.

Characters are atomic objects representing letters, digits, special symbols such as $ or _, and certain non-graphic control characters such as space and newline. Characters literals have the \ prefix. The written character representation of the letter A, for example, is \A.

The following are special literals that represent non-graphic characters:

\newline
\space
\return
\tab
\backspace
\alarm
\vtab
\esc
\delete
\nul

Any Unicode character may be written with the syntax \xhh, \uhhhh or \Uhhhhhhhh where n consists of two, four or eight hexadecimal digits representing a valid Unicode scalar value.

Examples:


is_char(\a)
// true
is_char(\2)
// true
is_char(2)
// false
is_char(\xef)
// true
is_char(\space)
// true
      

Also see:

char_is_eq
char_is_alphabetic
char_upcase
char_to_integer


Core Module Index | Contents