string x = "beta version"; assert(x.skipOver("beta")); assert(x == " version"); assert(x.skipOver(' ')); assert(x == "version");
constness of haystack and needle
{
const(char)[] haystack;
string needle;
assert(haystack.skipOver(needle));
}
{
const(char)[] haystack;
const(char)[] needle;
assert(haystack.skipOver(needle));
}
{
const(char)[] haystack;
char[] needle;
assert(haystack.skipOver(needle));
}https://forum.dlang.org/post/dhxwgtaubzbmjaqjmnmq@forum.dlang.org
Array-specialization of skipOver with default predicate.