Guest User

Untitled

a guest
Jul 16th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. void replace( const std::string& from, const std::string& to, std::string& str )
  2. {
  3. size_t pos;
  4. while ( (pos=str.find(from)) != std::string::npos )
  5. str.replace( pos, from.size(), to );
  6. }
Add Comment
Please, Sign In to add comment