- allOf
bool allOf(const(char)[] str, const(char)[] chars)
Checks if all characters in 'str' are contained in 'chars'.
- anyOf
bool anyOf(const(char)[] str, const(char)[] chars)
Checks if any character in 'str' is contained in 'chars'.
- formatAlloc
string formatAlloc(IAllocator alloc, string fmt, ARGS args)
Same as std.string.format, just using an allocator.
- icmp2
int icmp2(const(char)[] a, const(char)[] b)
Special version of icmp() with optimization for ASCII characters
- indexOfAny
sizediff_t indexOfAny(const(char)[] str, const(char)[] chars)
Finds the first occurence of any of the characters in chars
- indexOfCT
ptrdiff_t indexOfCT(Char[] s, dchar c, CaseSensitive cs)
Undocumented in source. Be warned that the author may not have intended to support it.
- indexOfCT
ptrdiff_t indexOfCT(Char[] s, Char[] needle)
Undocumented in source. Be warned that the author may not have intended to support it.
- matchBracket
sizediff_t matchBracket(const(char)[] str, bool nested)
Finds the closing bracket (works with any of '[', '(', '<', '{').
- sanitizeUTF8
string sanitizeUTF8(ubyte[] str)
Takes a string with possibly invalid UTF8 sequences and outputs a valid UTF8 string as near to
the original as possible.
- stripA
inout(char)[] stripA(inout(char)[] s)
ASCII whitespace trimming (space and tab)
- stripLeftA
inout(char)[] stripLeftA(inout(char)[] s)
ASCII whitespace trimming (space and tab)
- stripRightA
inout(char)[] stripRightA(inout(char)[] s)
ASCII whitespace trimming (space and tab)
- stripUTF8Bom
inout(char)[] stripUTF8Bom(inout(char)[] str)
Strips the byte order mark of an UTF8 encoded string.
This is useful when the string is coming from a file.
Utility functions for string processing