
On 09/04/2011 23:08, Marshall Clow wrote:
However, it seems it only allows searching for the substring from the beginning to the end, a shame ; it should allow the other way around too. Bad dealing of reverse string searching in Boost.StringAlgo is the reason why I personally had to rewrite big chunks of that library for my uses.
I'm not sure what you mean here. I'm assuming that a reverse_iterator adaptor doesn't do what you want.
I want to search for "foo" in "foo bar foo bar foo bar foo bar" starting from the end, my first match would be ^ and not ^ But I guess all the smart algorithms would need to redo preprocessing anyway, so reversing both strings seems like the way to go, even if that might have performance implications.