==============================================================================
| 70 | |
| 71 | //============================================================================== |
| 72 | std::string trimLeft(const std::string& str, const std::string& whitespaces) |
| 73 | { |
| 74 | size_t startpos = str.find_first_not_of(whitespaces); |
| 75 | return (startpos == std::string::npos) ? "" : str.substr(startpos); |
| 76 | } |
| 77 | |
| 78 | //============================================================================== |
| 79 | std::string trimRight(const std::string& str, const std::string& whitespaces) |