| 108 | } |
| 109 | |
| 110 | String String::substr(size_type pos, size_type count) const |
| 111 | { |
| 112 | if (pos > this->size()) { |
| 113 | throw std::out_of_range("Index out of range in String::substr"); |
| 114 | } |
| 115 | return String(*this, pos, count); |
| 116 | } |
| 117 | |
| 118 | String::String(std::string&& s, Private) |
| 119 | : string_(std::make_shared<std::string>(std::move(s))) |