Append characters to this string.
Synopsis
Declared in <bslstl_string.h>
template<class STRING_VIEW_LIKE_TYPE>
basic_string&
append(
STRING_VIEW_LIKE_TYPE const& suffix,
size_type position,
size_type numChars = npos);
Description
Append to this string the optionally specified numChars characters starting at the specified position in the bsl::string_view object, obtained from the specified suffix, or its tail starting at position if numChars exceeds the length of this tail. If numChars is not specified, npos is used. Return a reference providing modifiable access to this string. Throw out_of_range if `position > strView.length(). Throw `length_error` if the length of the resulting string exceeds `max_size().
Return Value
reference providing modifiable access to this string
Parameters
Name |
Description |
numChars |
number of characters |
suffix |
characters to append |
position |
starting index |
Created with MrDocs