Boost logo

Boost :

Subject: Re: [boost] Proposed Library Boost.Algorithm
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-04-09 17:48:34


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk