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

◆ operator+() [9/20]

template<typename _CharT, typename _Traits, typename _Alloc, template< typename, typename, typename > class _Base>
__versa_string< _CharT, _Traits, _Alloc, _Base > __gnu_cxx::operator+ ( const __versa_string< _CharT, _Traits, _Alloc, _Base > & __lhs,
const __versa_string< _CharT, _Traits, _Alloc, _Base > & __rhs )

Concatenate two strings.

Parameters
__lhsFirst string.
__rhsLast string.
Returns
New string with value of __lhs followed by __rhs.

Definition at line 185 of file vstring.tcc.

187 {
189 __str.reserve(__lhs.size() + __rhs.size());
190 __str.append(__lhs);
191 __str.append(__rhs);
192 return __str;
193 }
__versa_string & append(const __versa_string &__str)
Append a string to this string.
Definition vstring.h:698
size_type size() const noexcept
Returns the number of characters in the string, not including any null-termination.
Definition vstring.h:431
void reserve(size_type __res_arg=0)
Attempt to preallocate enough memory for specified number of characters.
Definition vstring.h:513
Template class __versa_string.
Definition vstring.h:63

References __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::append(), __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::reserve(), and __gnu_cxx::__versa_string< _CharT, _Traits, _Alloc, _Base >::size().

Here is the call graph for this function: