License
Subject to the terms of the MIT license, as written in the included LICENSE.txt file.
Utility functions for string processing
string sanitizeUTF8(in ubyte[] str) @safe pureinout(char)[] stripUTF8Bom(inout(char)[] str) @safe pure nothrowStrips the byte order mark of an UTF8 encoded string. This is useful when the string is coming from a file.bool allOf(const(char)[] str, const(char)[] chars) @safe pureChecks if all characters in 'str' are contained in 'chars'.bool anyOf(const(char)[] str, const(char)[] chars) @safe pureChecks if any character in 'str' is contained in 'chars'.inout(char)[] stripLeftA(inout(char)[] s) @safe pure nothrowASCII whitespace trimming (space and tab)inout(char)[] stripRightA(inout(char)[] s) @safe pure nothrowASCII whitespace trimming (space and tab)sizediff_t indexOfAny(const(char)[] str, const(char)[] chars) @safe pureFinds the first occurence of any of the characters in `chars`sizediff_t matchBracket(const(char)[] str, bool nested = true) @safe pure nothrowFinds the closing bracket (works with any of '[', '', '<', '{').string formatAlloc(Allocator, ARGS...)(scope Allocator alloc, string fmt, ARGS args)Same as std.string.format, just using an allocator.int icmp2(const(char)[] a, const(char)[] b) @safe pure nothrowSpecial version of icmp() with optimization for ASCII characters