Repository navigation
dos_strischar
Dale Fugier edited this page Jul 1, 2026
·
1 revision
Tests a character for satisfaction of a condition or conditions described by bits.
(dos_strischar [char [bits]])
char
The character to test.
bits
A bit-coded integer identifying the desired condition. Specify more than one condition by adding the following bit values:
| Value | Description |
|---|---|
| 1 | Alphanumeric. Character within the ranges A – Z, a – z, or 0 – 9. |
| 2 | Alphabetic. Character within the ranges A – Z or a – z. |
| 4 | Decimal digit. Character is a decimal digit (0 – 9). |
| 8 | Printable. Character is a printable character, including the space character (0x20 – 0x7E). |
| 16 | Punctuation. Any printable character that is not a space character or an alphanumeric character |
| 32 | White-space. Character is a white-space character (0x09 – 0x0D or 0x20). |
| 64 | Lowercase. Character is a lowercase character (a – z). |
| 128 | Uppercase. Character is an uppercase character (A – Z). |
| 256 | ASCII. Character is an ASCII character (in the range 0x00 – 0x7F). |
| 512 | Control. Character is a control character (0x00 – 0x1F or 0x7F). |
T if successful.
nil if not successful, or on error.
Command: (dos_strischar "D" 2)
T
Command: (dos_strischar "D" 4)
nil
Command: (dos_strischar "D" 129)
T