Append a substring of suffix to this string.

Synopsis

Declared in <bslstl_string.h>

basic_string&
append(
    basic_string 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 specified suffix, or the tail of suffix starting at position if `position + numChars > suffix.length(). If `numChars is not specified, npos` is used. Return a reference providing modifiable access to this string. Throw `out_of_range if position > suffix.length().

Return Value

a reference to this string

Parameters

Name

Description

suffix

string providing the characters to append

position

starting index in suffix

numChars

number of characters to append

Created with MrDocs