| 441 | } |
| 442 | |
| 443 | String String::trimEnd(String const& pattern) const { |
| 444 | size_t end; |
| 445 | for (end = size(); end > 0; --end) { |
| 446 | Char ec = (*this)[end - 1]; |
| 447 | if (!pattern.hasCharOrWhitespace(ec)) |
| 448 | break; |
| 449 | } |
| 450 | return substr(0, end); |
| 451 | } |
| 452 | |
| 453 | String String::trimBeg(String const& pattern) const { |
| 454 | size_t beg; |
no test coverage detected