Insert a substring.
- Parameters
-
| __pos1 | Position in string to insert at. |
| __str | The string to insert. |
| __pos2 | Start of characters in str to insert. |
| __n | Number of characters to insert. |
- Returns
- Reference to this string.
- Exceptions
-
Starting at pos1, insert __n character of __str beginning with __pos2. If adding characters causes the length to exceed max_size(), length_error is thrown. If __pos1 is beyond the end of this string or __pos2 is beyond the end of __str, out_of_range is thrown. The value of the string doesn't change if an error is thrown.
Definition at line 1716 of file cow_string.h.
constexpr size_type _M_limit(size_type __pos, size_type __off) const noexcept
constexpr void _M_data(pointer __p)
constexpr size_type _M_check(size_type __pos, const char *__s) const
constexpr iterator insert(const_iterator __p, size_type __n, _CharT __c)
Insert multiple characters.
Managing sequences of characters and character-like objects.