fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. string Name = "b0__fifo__test", Identity;
  9.  
  10. string::size_type start = 0, end;
  11.  
  12. while ((end = Name.find("__", start)) != std::string::npos)
  13. {
  14. Identity += Name.substr(start, (end + 1) - start);
  15. start = end + 2;
  16. }
  17.  
  18. if (start < Name.size())
  19. Identity += Name.substr(start);
  20.  
  21. cout << Identity;
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0.01s 5432KB
stdin
Standard input is empty
stdout
b0_fifo_test