Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

strip space from string cpp

#include<iostream>
#include<algorithm>
using namespace std;
main() {
   string my_str = "This is C++ Programming Language";
   cout << "String with Spaces :" << my_str << endl;
   remove(my_str.begin(), my_str.end(), ' ');
   cout << "String without Spaces :" << my_str;
}
Source by www.tutorialspoint.com #
 
PREVIOUS NEXT
Tagged: #strip #space #string #cpp
ADD COMMENT
Topic
Name
8+4 =