Lexer: Migrated trim(), trimLeft() and trimRight() from text to Lexer

This commit is contained in:
Paul Beckingham 2015-10-30 11:17:23 -04:00
parent 51def4b12b
commit 182b5427cd
13 changed files with 75 additions and 72 deletions

View file

@ -90,7 +90,7 @@ bool confirm (const std::string& question)
std::string answer {""};
std::getline (std::cin, answer);
context.debug ("STDIN '" + answer + "'");
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_NO : Lexer::lowerCase (trim (answer));
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_NO : Lexer::lowerCase (Lexer::trim (answer));
autoComplete (answer, options, matches, 1); // Hard-coded 1.
}
@ -130,7 +130,7 @@ int confirm4 (const std::string& question)
std::string answer {""};
std::getline (std::cin, answer);
context.debug ("STDIN '" + answer + "'");
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_QUIT : Lexer::lowerCase (trim (answer));
answer = std::cin.eof () ? STRING_UTIL_CONFIRM_QUIT : Lexer::lowerCase (Lexer::trim (answer));
autoComplete (answer, options, matches, 1); // Hard-coded 1.
}
while (! std::cin.eof () && matches.size () != 1);