make trimString more readable
This commit is contained in:
parent
04adf4b42c
commit
0e05eee14a
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
inline std::string trimString(const std::string &str) {
|
||||
std::string ret(str);
|
||||
ret.erase(0, ret.find_first_not_of(" \n\r\t"));
|
||||
ret.erase(ret.find_last_not_of(" \n\r\t") + 1);
|
||||
ret.erase(ret.find_last_not_of(" \n\r\t") + 1, std::string::npos);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue