MaksNew

Untitled

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