File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -221,13 +221,14 @@ std::vector<std::string> stringTokenize(const std::string& str)
221221
222222void cliThreadProc ()
223223{
224+ const std::string whitespace = " \t " ;
224225 while (!shouldClose) {
225226 std::cout << " \n > " ;
226227
227228 std::string command;
228229 std::getline (std::cin, command);
229- std::size_t start = command.length ()? command.find_first_not_of (" " ): 0 ;
230- std::size_t pos = command.find ( " " , start);
230+ std::size_t start = command.length ()? command.find_first_not_of (whitespace ): 0 ;
231+ std::size_t pos = command.find_first_of (whitespace , start);
231232 std::string kw = command.substr (start, pos - start);
232233 std::string args = command.substr (pos + 1 );
233234 std::vector<std::string> tokens = stringTokenize (args);
You can’t perform that action at this time.
0 commit comments