| 661 | } |
| 662 | |
| 663 | String String::substr(size_type pos, size_type cnt) && { |
| 664 | cnt = std::min(cnt, size() - 1 - pos); |
| 665 | char* cptr = c_str(); |
| 666 | memmove(cptr, cptr + pos, cnt); |
| 667 | setSize(cnt); |
| 668 | return std::move(*this); |
| 669 | } |
| 670 | |
| 671 | String String::substr(size_type pos, size_type cnt) const & { |
| 672 | cnt = std::min(cnt, size() - 1 - pos); |
no test coverage detected