| immutable class CHAR < $IS_LT{CHAR}, $HASH, $STR, $FMT |
|---|
| **** | Objects which represent characters. This version is for ASCII. Other implementations might use UNICODE, etc. |
| $FMT | $STR | $HASH | $IS_EQ | $IS_LT{_} |
| const asize:=SYS::char_size; |
|---|
| ascii_int:INT |
|---|
| **** | The ASCII integer associated with each character in the minimal Sather character set. Returns -1 for other characters. |
| digit_value:INT |
|---|
| **** | The numerical value of self as a decimal digit. -1 if it isn't. |
| fmt( f: STR ): STR |
|---|
| from_ascii_int(i:INT):SAME |
|---|
| **** | The ASCII character corresponding to `i' for characters in the Sather set, and the character with code `i' for the remainder. |
| hash:INT |
|---|
| **** | A very cheap, but not very good hash value. It just returns the hash of the integer representation of the char. |
| hex_digit_value:INT |
|---|
| **** | The numerical value of self as a hexadecimal digit. -1 if it isn't. |
| int:INT |
|---|
| **** | The integer version of self. Returns unsigned value. Built-in. |
| is_alpha:BOOL |
|---|
| **** | True if self is an alphabetic character. |
| is_alphanum:BOOL |
|---|
| **** | True if self is alphanumeric. |
| is_control:BOOL |
|---|
| **** | True if self is a control character. |
| is_digit:BOOL |
|---|
| **** | True if self is a digit. |
| is_eq(c:SAME):BOOL |
|---|
| **** | True if self and `c' are equal. |
| is_geq(c:SAME):BOOL |
|---|
| **** | True if self is later than `c' in the ordering of characters or is equal to it. |
| is_gt(c:SAME):BOOL |
|---|
| **** | True if self is after `c' in the ordering of characters. |
| is_hex_digit:BOOL |
|---|
| **** | True if self is a hexadecimal digit. |
| is_leq(c:SAME):BOOL |
|---|
| **** | True if self is earlier than `c' in the ordering of characters or is equal to it. |
| is_lower:BOOL |
|---|
| **** | True if self is lowercase. |
| is_lt(c:SAME):BOOL |
|---|
| **** | True if self is earlier than `c' in the ordering of characters. |
| is_neq(c:SAME):BOOL |
|---|
| **** | True if self and `c' are equal. |
| is_octal_digit:BOOL |
|---|
| **** | True if self is an octal digit. |
| is_print:BOOL |
|---|
| **** | True if self is a printing character. |
| is_punct:BOOL |
|---|
| **** | True if self is punctuation. |
| is_space:BOOL |
|---|
| **** | True if self is one of the whitespace characters: space, form feed, newline, carriage return, tab, vertical tab. NOTE: temporarily Ctrl-Z will be treated as whitespace. This
_______ensures_OS/2_compatibility_until_FILE_classes_are_fixed. |
| is_upper:BOOL |
|---|
| **** | True if self is uppercase. |
| lower:CHAR |
|---|
| **** | A lower case version of self. Leaves non-alphabetic chars unchanged. |
| octal_digit_value:INT |
|---|
| **** | The numerical value of self as an octal digit. -1 if not. |
| pretty:STR |
|---|
| **** | A pretty version of self. It includes single quotes around self and uses special codes or the octal representation for non printing characters. |
| str:STR |
|---|
| upper:CHAR |
|---|
| **** | An upper case version of self. Leaves non-alphabetic chars unchanged. |