MaksNew

Untitled

Nov 5th, 2020
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. string getCondition(string sentence)
  2. {
  3.     while (sentence[0] == ' '){
  4.         sentence.erase(0, 1);
  5.     }
  6.     while ((sentence.find("  ")) > 0) {
  7.         sentence.erase(sentence.find("  "), 1);
  8.     }
  9.     while (sentence.back() == ' ') {
  10.         sentence.erase(sentence.back(), 1);
  11.     }
  12.     return sentence;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment