Boost logo

Boost Users :

From: Pavol Droba (droba_at_[hidden])
Date: 2007-09-29 11:08:08


Hi,

I think that your arguments are reasonable. Even if I don't like to
extend the number of find/erase/replace functions very much.

I'll put it on my todo list, but I cannot promise when it actually be
implemented.

Reagards,
Pavol.

gast128 wrote:
> Dear all
>
> I was requesting an 'erase_if' a while ago, and now I ran into a 'replace_if'
> problem. So after spendig 2 hours in the documentation, I finally found on www
> ('[string_algo] replace repeated char with single instance?') that one should
> use the 'find_format_all':
>
> boost::find_format_all(str, boost::token_finder(boost::is_any_of("ab")),
> boost::const_formatter("c"));
>
> But wouldn't it be better to make a 'replace_if' shortcut solely for the
> purpose of documentation reasons:
>
> boost::replace_all_if(str, boost::is_any_of("ab"), "c");
>
> I think that most people find the last line easier to read and comprehend than
> its (more powerful) 'find_format' cousin. The string_algo library is nice but
> I get lost more than once. Especially find, replace, erease with predicates
> are often used by us. However direct use seems not possible.
>
> wkr,
> me
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net