Line to strip the left side of.
The passed line without any preceding whitespace or linebreaks.
static if (!is(typeof("blah".strippedLeft) == string)) { enum message = "`lu.string.strippedLeft` should return a mutable string"; static assert(0, message); } { immutable preceded = " abc"; immutable stripped = preceded.strippedLeft; assert((stripped == "abc"), stripped); } { immutable preceded = " "; immutable stripped = preceded.strippedLeft; assert((stripped == ""), stripped); } { immutable empty = ""; immutable stripped = empty.strippedLeft; assert((stripped == ""), stripped); } { immutable noPreceded = "abc"; immutable stripped = noPreceded.strippedLeft; assert((stripped == noPreceded), stripped); } { immutable linebreak = "\r\n\r\n abc"; immutable stripped = linebreak.strippedLeft; assert((stripped == "abc"), stripped); }
Returns a slice of the passed string with any preceding whitespace and/or linebreaks sliced off. Overload that implicitly strips " \n\r\t".
Duplicates std.string.stripLeft, which we can no longer trust not to assert on unexpected input.