Trims left and right side of str, using predicate to check if the character stays (false) or will be trimmed (true) cppcheck-suppress passedByValue
| 52 | // stays (false) or will be trimmed (true) |
| 53 | // cppcheck-suppress passedByValue |
| 54 | inline void trim(std::string& str, std::function<bool(char)> pred) { |
| 55 | trim_left(str, pred); |
| 56 | trim_right(str, pred); |
| 57 | } |
| 58 | |
| 59 | // |
| 60 | // Predicate for trim |
no test coverage detected