string x = "beta version"; assert(x.skipOver("beta")); assert(x == " version"); assert(x.skipOver(' ')); assert(x == "version");
constness of haystack and needle
1 { 2 const(char)[] haystack; 3 string needle; 4 assert(haystack.skipOver(needle)); 5 } 6 { 7 const(char)[] haystack; 8 const(char)[] needle; 9 assert(haystack.skipOver(needle)); 10 } 11 { 12 const(char)[] haystack; 13 char[] needle; 14 assert(haystack.skipOver(needle)); 15 }
https://forum.dlang.org/post/dhxwgtaubzbmjaqjmnmq@forum.dlang.org
Array-specialization of skipOver with default predicate.