fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. std::string name = "Thornton, Billy Bob";
  6. std::string standard_format = name.substr(name.find(',') + 2, std::string::npos) + " " + name.substr(0, name.find(','));
  7. std::cout << standard_format;
  8. return 0;
  9. }
Success #stdin #stdout 0s 3428KB
stdin
Standard input is empty
stdout
Billy Bob Thornton