string x = "beta version"; assert(x.skipOverBack(" version")); assert(x == "beta"); assert(x.skipOverBack('a')); assert(x == "bet"); assert(!x.skipOverBack("_")); assert(x == "bet"); assert(!x.skipOverBack('_')); assert(x == "bet");
https://forum.dlang.org/post/dhxwgtaubzbmjaqjmnmq@forum.dlang.org
Array-specialization of skipOverBack with default predicate.
See: std.string.chomp