Published in: C++
example: findandreplace( source, "\n", "\n" );
void find_and_replace( string &source, const string find, string replace ) { size_t j; for ( ; (j = source.find( find )) != string::npos ; ) { source.replace( j, find.length(), replace ); } }
You need to login to post a comment.
