assert("beta".stripLeft(' ') == "beta"); assert(" beta".stripLeft(' ') == "beta"); assert(" beta".stripLeft(' ') == "beta"); assert(" beta".stripLeft(' ') == "beta"); assert(" beta".stripLeft() == "beta"); assert(" _ beta _ ".stripLeft(' ') == "_ beta _ "); assert(" _ beta _ ".stripLeft(' ') == "_ beta _ "); char[] f()() @safe pure nothrow { char[1] x = "_"; return x[].stripLeft(' '); } static if (isDIP1000) static assert(!__traits(compiles, { auto _ = f(); }));
https://forum.dlang.org/post/dhxwgtaubzbmjaqjmnmq@forum.dlang.org
Array-specialization of stripLeft with default predicate.