The OpenD Programming Language

std.ascii

Functions which operate on ASCII characters.

All of the functions in std.ascii accept Unicode characters but effectively ignore them if they're not ASCII. All isX functions return false for non-ASCII characters, and all toX functions do nothing to non-ASCII characters.

For functions which operate on Unicode characters, see std.uni.

References: ASCII Table, Wikipedia

Members

Enums

ControlChar
enum ControlChar

All control characters in the ASCII table (source).

LetterCase
enum LetterCase

Letter case specifier.

Functions

isASCII
bool isASCII(dchar c)
isAlpha
bool isAlpha(dchar c)
isAlphaNum
bool isAlphaNum(dchar c)
isControl
bool isControl(dchar c)
isDigit
bool isDigit(dchar c)
isGraphical
bool isGraphical(dchar c)
isHexDigit
bool isHexDigit(dchar c)
isLower
bool isLower(dchar c)
isOctalDigit
bool isOctalDigit(dchar c)
isPrintable
bool isPrintable(dchar c)
isPunctuation
bool isPunctuation(dchar c)
isUpper
bool isUpper(dchar c)
isWhite
bool isWhite(dchar c)
toLower
auto toLower(C c)

Converts an ASCII letter to lowercase.

toUpper
auto toUpper(C c)

Converts an ASCII letter to uppercase.

Variables

digits
auto digits;

0 .. 9

fullHexDigits
auto fullHexDigits;

0 .. 9A .. Fa .. f

hexDigits
auto hexDigits;

0 .. 9A .. F

letters
auto letters;

A .. Za .. z

lowerHexDigits
auto lowerHexDigits;

0 .. 9a .. f

lowercase
auto lowercase;

a .. z

octalDigits
auto octalDigits;

0 .. 7

uppercase
auto uppercase;

A .. Z

whitespace
auto whitespace;

ASCII whitespace

Meta