Boost logo

Boost Users :

From: chun ping wang (cablepuff_at_[hidden])
Date: 2007-09-15 12:34:03


http://www.boost.org/doc/html/string_algo/reference.html#header.boost.algorithm.string.trim.hpp

http://engineering.meta-comm.com/resources/cs-win32_metacomm/doc/html/string_algo/usage.html#id764776
On 9/15/07, Mark Wyszomierski <markww_at_[hidden]> wrote:
>
> Hi,
>
> Is it possible using the trim() family of functions to remove not just
> white space, but some substring from the right of a string? For
> example, if I want to remove commas from the right:
>
> string str = "whatever,";
> TrimRight(str, ",");
> // str == "whatever" now.
>
> or a full string to trim:
>
> string str = "hello world";
> TrimRight(str, "world");
> // str == "hello ";
>
> I could write these simple functions myself but am wondering if boost
> can do that already,
>
> Thanks,
> Mark
> _______________________________________________
> 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