libstdc++
GNU C++ library
Loading...
Searching...
No Matches

◆ insert() [5/9]

template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base>
__versa_string & __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::insert ( size_type __pos,
const _CharT * __s )
inline

Insert a C string.

Parameters
__posIterator referencing location in string to insert at.
__sThe C string to insert.
Returns
Reference to this string.
Exceptions
std::length_errorIf new length exceeds max_size().
std::out_of_rangeIf __pos is beyond the end of this string.

Inserts the first __n characters of __s starting at __pos. If adding characters causes the length to exceed max_size(), length_error is thrown. If __pos is beyond end(), out_of_range is thrown. The value of the string doesn't change if an error is thrown.

Definition at line 1108 of file vstring.h.

1109 {
1111 return this->replace(__pos, size_type(0), __s,
1113 }
#define __glibcxx_requires_string(_String)
Definition debug.h:81
_CharT_alloc_type::size_type size_type
Definition vstring.h:73
__versa_string & replace(size_type __pos, size_type __n, const __versa_string &__str)
Replace characters with value from another string.
Definition vstring.h:1263
Template class __versa_string.
Definition vstring.h:63