[#bsl-erase-07]
= xref:bsl.adoc[bsl]::erase
:relfileprefix: ../
:mrdocs:

Erase (in&hyphen;place) all the elements from the specified `str` that compare equal to the specified `c`, and return the number of erased elements&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;string&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR&lowbar;TYPE,
    class CHAR&lowbar;TRAITS,
    class ALLOCATOR,
    class OTHER&lowbar;CHAR&lowbar;TYPE&gt;
bsl::basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;::size&lowbar;type
erase(
    xref:bsl/basic_string-0faf.adoc[basic&lowbar;string&lt;CHAR&lowbar;TYPE, CHAR&lowbar;TRAITS, ALLOCATOR&gt;]& str,
    OTHER&lowbar;CHAR&lowbar;TYPE const& c);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
