Multi-Prefix Version of skipOver()
"Nordlöw" via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Nov 15 06:41:27 PST 2014
What's currently the fastest way of removing the largest matching
prefix from an array of prefix arrays from an array in D like
auto x = "first_second";
x.skipOverLargestMatch(["fir", "first"]);
assert( == "_second");
auto x = "first_second";
x.skipOverLargestMatch(["fir"]);
assert( == "st_second");
The list of prefixes is preferrably dynamically generated but can
also a variadic list of arguments if necessary.
I guess we could reuse variadic find in the static case.
More information about the Digitalmars-d-learn
mailing list