tango.text.Ascii

License:

BSD style: see license.txt

Version:

Dec 2006: Initial release

Author:

Kris

Placeholder for a selection of ASCII utilities. These generally will not work with utf8, and cannot be easily extended to utf16 or utf32
char[] toLower(char[] src)
Convert to lowercase in-place.
char[] toLower(const(char[]) src, char[] dst)
Convert to lowercase. Returns the converted content in dst.
char[] toUpper(char[] src)
Convert to uppercase in-place.
char[] toUpper(const(char[]) src, char[] dst)
Convert to uppercase. Returns the converted content in dst.
int icompare(const(char[]) s1, const(char[]) s2)
Compare two char[] ignoring case. Returns 0 if equal
int compare(const(char[]) s1, const(char[]) s2)
Compare two char[] with case. Returns 0 if equal
size_t isearch(in char[] src, in char[] pattern)
Return the index position of a text pattern within src, or src.length upon failure.
This is a case-insensitive search (with thanks to Nietsnie)