#include <boost/algorithm/string.hpp> #include <cstdlib> #include <iostream> #include <string> using namespace std; using namespace boost::algorithm; int main() { string str; cout<<"Enter any string : "; getline(cin,str); char replaceChar,replaceWith; cout<<"Which character replace : "; cin>>replaceChar; cout<<"character replace with "<<replaceChar<<":"; cin>>replaceWith; cout <<"\n"<< replace_all_copy(str,replaceChar,replaceWith); return 0; }
Name | Views | Likes |
---|---|---|
C++ Boost:chrono | 240 | 0 |
C++ minmax() | 262 | 0 |
C++ Pointer Container | 405 | 0 |
C++ Algorithm all_of_equal | 279 | 0 |
C++ Multiprecision | 365 | 0 |
C++ Common Factor | 261 | 0 |
Binary tree convert into mirror tree | 308 | 0 |
C++ to_upper_copy() and to_lower_copy() | 525 | 0 |
C++ Algorithm erase_all_copy() | 376 | 0 |
C++ sort() | 231 | 0 |
C++ Algorithm replace_all_copy() | 1417 | 0 |
C++ Algorithm one_of_equal | 259 | 0 |
Comments