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.

$(BOOKTABLE, $(TR $(TH Category) $(TH Functions)) $(TR $(TD Validation) $(TD $(LREF isAlpha) $(LREF isAlphaNum) $(LREF isASCII) $(LREF isControl) $(LREF isDigit) $(LREF isGraphical) $(LREF isHexDigit) $(LREF isOctalDigit) $(LREF isPrintable) $(LREF isPunctuation) $(LREF isUpper) $(LREF isWhite) )) $(TR $(TD Conversions) $(TD $(LREF toLower) $(LREF toUpper) )) $(TR $(TD Constants) $(TD $(LREF digits) $(LREF fullHexDigits) $(LREF hexDigits) $(LREF letters) $(LREF lowercase) $(LREF lowerHexDigits) $(LREF newline) $(LREF octalDigits) $(LREF uppercase) $(LREF whitespace) )) $(TR $(TD Enums) $(TD $(LREF LetterCase) )) )

References: ASCII Table, Wikipedia

Members

Enums

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

newline
auto newline;

Newline sequence for this system.

Meta

Authors

Walter Bright and Jonathan M Davis