* @brief Attempts to reserve enough space for a specified number of characters. * @param[in] capacity The new capacity to reserve. * @return `true` if the reservation was successful, `false` otherwise. */
| 3418 | * @return `true` if the reservation was successful, `false` otherwise. |
| 3419 | */ |
| 3420 | bool try_reserve(size_type capacity) noexcept { |
| 3421 | auto status = _with_alloc([&](sz_alloc_type &alloc) { |
| 3422 | return sz_string_reserve(&string_, capacity, &alloc) ? sz_success_k : sz_bad_alloc_k; |
| 3423 | }); |
| 3424 | return status == status_t::success_k; |
| 3425 | } |
| 3426 | |
| 3427 | /** |
| 3428 | * @brief Assigns a new value to the string, replacing its current contents. |
nothing calls this directly
no test coverage detected