CHARACTER FUNCTIONS
EXTRACT A CHARACTER FROM A STRING
(char <string> <index>)
- <string> the string
- <index> the string index (zero relative)
- returns the ascii code of the character
IS THIS CHARACTER ALPHANUMERIC?
(alphanumericp <chr>)
- <chr> the character
- returns true if the character is alphabetic or numeric, NIL otherwise
IS THIS AN UPPER CASE CHARACTER?
(upper-case-p <chr>)
- <chr> the character
- returns true if the character is upper case, NIL otherwise
IS THIS A LOWER CASE CHARACTER?
(lower-case-p <chr>)
- <chr> the character
- returns true if the character is lower case, NIL otherwise
IS THIS AN ALPHABETIC CHARACTER?
(alpha-char-p <chr>)
- <chr> the character
- returnstrue if the character is alphabetic, NIL otherwise
IS THIS AN ALPHABETIC (EITHER CASE) CHARACTER?
(both-case-p <chr>)
- <chr> the character
- returns true if the character is available in both cases, NIL otherwise
IS THIS A DIGIT CHARACTER?
(digit-char-p <chr>)
- <chr> the character
- returns the digit weight if character is a digit, NIL otherwise
GET THE ASCII CODE OF A CHARACTER
(char-code <chr>)
- <chr> the character
- returns the ASCII character code (integer, parity bit stripped)
GET THE CHARACTER WITH A SPECFIED ASCII CODE
(code-char <code>)
- <code> the ASCII code (integer, range 0-127)
- returns the character with that code or NIL
CONVERT A CHARACTER TO UPPER CASE
(char-upcase <chr>)
- <chr> the character
- returns the upper case version of the character, if one exists, otherwise returns the character
CONVERT A CHARACTER TO LOWER CASE
(char-downcase <chr>)
- <chr> the character
- returns the lower case version of the character, if one exists, otherwise returns the character
CONVERT A DIGIT WEIGHT TO A DIGIT
(digit-char <n>)
- <n> the digit weight (integer)
- returns the digit character or NIL
CONVERT A CHARACTER TO AN INTEGER
(char-int <chr>)
- <chr> the character
- returns the ASCII character code (range 0-255)
CONVERT AN INTEGER TO A CHARACTER
(int-char <int>)
- <int> the ASCII character code (treated modulo 256)
- returns the character with that code
(char< <chr1> <chr2>...)
(char<= <chr1> <chr2>...)
(char= <chr1> <chr2>...)
(char/= <chr1> <chr2>...)
- <chr1> the first character to compare
- <chr2> the second character(s) to compare
- returns t if predicate is true, NIL otherwise
Note: case is significant with these comparison functions.
(char-lessp <chr1> <chr2>...)
(char-not-greaterp <chr1> <chr2>...)
(char-equal <chr1> <chr2>...)
(char-not-equal <chr1> <chr2>...)
(char-not-lessp <chr1> <chr2>...)
(char-greaterp <chr1> <chr2>...)
- <chr1> the first string to compare
- <chr2> the second string(s) to compare
- returns t if predicate is true, NIL otherwise
Note: case is not significant with these comparison functions -- all uppercase characters are converted to lowercase before the comparison.
XLISP-PLUS - Version 2.1g - Tom Almy
tom.almy@tek.com - 18 JUL 94
Generated with WebMaker