By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,303 Members | 1,640 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,303 IT Pros & Developers. It's quick & easy.

string replace function

P: n/a
Can anyone point me to a string function that will search a string for
the following 4 characters & < " and replace them with &amp, &lt,
&gt, &quot.

That is a search and replace function.

Thanks if you can help.

Enda

Oct 2 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
ke****************@yahoo.co.uk wrote:
Can anyone point me to a string function that will search a string for
the following 4 characters & < " and replace them with &amp, &lt,
&gt, &quot.
The 'find...' family of member functions of the std::string class will
do the job for you: you can easily put these together to do what you want.
A good reference for them (and in fact for the whole of C++) is here:
http://www.codeguru.com/cpp/tic/tic0180.shtml.

Good luck!
Tom
Oct 2 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.