* @brief Informs the string object of a planned change in size, so that it pre-allocate once. * @throw `std::length_error` if the string is too long. */
| 3625 | * @throw `std::length_error` if the string is too long. |
| 3626 | */ |
| 3627 | void reserve(size_type capacity) noexcept(false) { |
| 3628 | if (capacity > max_size()) throw std::length_error("sz::basic_string::reserve"); |
| 3629 | if (!try_reserve(capacity)) throw std::bad_alloc(); |
| 3630 | } |
| 3631 | |
| 3632 | /** |
| 3633 | * @brief Inserts @b (in-place) a ::character multiple times at the given offset. |
no outgoing calls