|
Boost Users : |
Subject: Re: [Boost-users] Complex serach and replace in C++ string
From: Nathan Ridge (zeratul976_at_[hidden])
Date: 2012-03-06 12:07:16
> Is it possible search and replace or delete a character in a piece of string
> delimited by 2 positions found by the method find() (find() return position
> (size_t) and not an iterator) using some function of boost?
I'm not sure what you mean by "delimited by 2 positions" (could you give an
example?), but note that you can easily (and efficiently) convert the result of
find() to an iterator like this:
string::const_iterator it = s.begin() + s.find("something");
Regards,
Nate
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