erase overloads

Synopses

Declared in <bslstl_string.h>

Erase characters from this string.

Erase the substring in the half‐open range [first, last)].

Erase characters from this string.

basic_string&
erase(
    size_type position = 0,
    size_type numChars = npos);

Return Value

  • iterator following the last removed character

  • reference providing modifiable access to this string

Parameters

Name

Description

position

starting index

first

beginning of the range to erase

last

end of the range to erase

numChars

number of characters

Created with MrDocs