fork download
  1. #include <iostream> /* C++ iostream C++98/11 */
  2. #include <string> /* C++ strings C++98/11 */
  3. #include <boost/regex.hpp> /* RegEx Boost */
  4. #include <boost/algorithm/string.hpp>
  5. using namespace std;
  6. int main() {
  7.  
  8. string s1 = " Ritik";
  9. cout<<s1<<endl;
  10. boost::trim_left(s1);
  11. cout<<s1;
  12.  
  13. }
  14.  
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
  Ritik
Ritik