[#bsl-basic_string-0ce-erase-08f] = xref:bsl.adoc[bsl]::xref:bsl/basic_string-0ce.adoc[basic_string<char16_t>]::erase :relfileprefix: ../../ :mrdocs: Erase from this string a substring defined by the specified pair of `first` and `last` iterators within this string. Return an iterator providing modifiable access to the character at the `last` position prior to erasing. If no such character exists, return `end()`. This method invalidates existing iterators pointing to `first` or a subsequent position. The behavior is undefined unless `first` and `last` are both within the range `[cbegin() .. cend()]` and `first <= last`. == Synopsis Declared in `<bslstl_string.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:bsl/basic_string-0ce/iterator.adoc[iterator] erase( xref:bsl/basic_string-0ce/const_iterator.adoc[const_iterator] first, xref:bsl/basic_string-0ce/const_iterator.adoc[const_iterator] last); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#