How to replace all dots(.) into a string with a space(' ')??
Example:
Input: yaa.asdfasdf.asdff
Output: yaa asdfasdf asdff
1 2 3
|
string s="abcd.efg";
for(int i=0; i<s.length; i++ )
if(s[i]=='.') s[i] = ' ';
|
How to do it using STL??
std::replace(input.begin(), input.end(), '.',' ');
Topic archived. No new replies allowed.