NEXT ·  UP ·  PREVIOUS ·  CONTENTS ·  INDEX

The Char structure

Operations on characters are found in the Char structure. These include the integer equivalents of the word-to-character conversion functions, Char.chr and Char.ord. Also included are successor and predecessor functions, Char.succ and Char.pred. Many functions perform obvious tests on characters, such as Char.isAlpha, Char.isUpper, Char.isLower, Char.isDigit, Char.isHexDigit and Char.isAlphaNum. Some exhibit slightly more complicated behaviour, such as Char.isAscii which identifies seven-bit ASCII characters; and Char.isSpace which identifies whitespace (spaces, tabulate characters, line break and page break characters); Char.isPrint identifies printable characters and Char.isGraph identifies printable, non-whitespace characters. The functions Char.toUpper and Char.toLower behave as expected, leaving non-lowercase (respectively non-uppercase) characters unchanged. The pair of complementary functions Char.contains and Char.notContains may be used to determine the presence or absence of a character in a string. Relational operators on characters are also provided in the Char structure.

NEXT ·  UP ·  PREVIOUS ·  CONTENTS ·  INDEX