M
Mike C#
Hi all,
I'm using std::strings in a program, and was wondering what the most
efficient method of performing the following two tasks would be:
1. Locate all apostrophes (') in a string and replace with two apostrophes
('')
2. Locate all side-by-side double quotation marks ("") and replace with a
single quotation mark (")
Right now I'm looping through the individual characters of the string,
comparing them and appending the individual chars to another std::string.
There has to be a more efficient method.
Thanks
I'm using std::strings in a program, and was wondering what the most
efficient method of performing the following two tasks would be:
1. Locate all apostrophes (') in a string and replace with two apostrophes
('')
2. Locate all side-by-side double quotation marks ("") and replace with a
single quotation mark (")
Right now I'm looping through the individual characters of the string,
comparing them and appending the individual chars to another std::string.
There has to be a more efficient method.
Thanks