| 451 | } |
| 452 | |
| 453 | String String::trimBeg(String const& pattern) const { |
| 454 | size_t beg; |
| 455 | for (beg = 0; beg < size(); ++beg) { |
| 456 | Char bc = (*this)[beg]; |
| 457 | if (!pattern.hasCharOrWhitespace(bc)) |
| 458 | break; |
| 459 | } |
| 460 | return substr(beg); |
| 461 | } |
| 462 | |
| 463 | String String::trim(String const& pattern) const { |
| 464 | return trimEnd(pattern).trimBeg(pattern); |
no test coverage detected