@b DynamicBuffer_v2: Shrink the underlying memory by the specified number of bytes. * Erases @c n bytes from the end of the string by resizing the basic_string * object. If @c n is greater than the current size of the string, the string * is emptied. */
| 1773 | * is emptied. |
| 1774 | */ |
| 1775 | void shrink(std::size_t n) |
| 1776 | { |
| 1777 | string_.resize(n > size() ? 0 : size() - n); |
| 1778 | } |
| 1779 | |
| 1780 | /// @b DynamicBuffer_v1: Remove characters from the input sequence. |
| 1781 | /// @b DynamicBuffer_v2: Consume the specified number of bytes from the |