[#BloombergLP-bdlde-Utf8Util-replaceErrors-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/Utf8Util.adoc[Utf8Util]::replaceErrors
:relfileprefix: ../../../
:mrdocs:

Replace UTF&hyphen;8 error sequences in `input` and write to `output`&period;

== Synopses

Declared in `&lt;bdlde&lowbar;utf8util&period;h&gt;`

Replace UTF&hyphen;8 error sequences in `input` and write to `output`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlde/Utf8Util/size_type.adoc[size&lowbar;type]
xref:BloombergLP/bdlde/Utf8Util/replaceErrors-08.adoc[replaceErrors](
    xref:bsl/string.adoc[bsl::string]* output,
    std::string&lowbar;view const& input,
    unsigned int utf32ErrorCode = k&lowbar;ERROR&lowbar;CODE&lowbar;POINT);
----

[.small]#xref:BloombergLP/bdlde/Utf8Util/replaceErrors-08.adoc[_» more&period;&period;&period;_]#

Replace UTF&hyphen;8 error sequences in `input` and write to `output`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlde/Utf8Util/size_type.adoc[size&lowbar;type]
xref:BloombergLP/bdlde/Utf8Util/replaceErrors-07.adoc[replaceErrors](
    std::pmr::string* output,
    std::string&lowbar;view const& input,
    unsigned int utf32ErrorCode = k&lowbar;ERROR&lowbar;CODE&lowbar;POINT);
----

[.small]#xref:BloombergLP/bdlde/Utf8Util/replaceErrors-07.adoc[_» more&period;&period;&period;_]#

Replace UTF&hyphen;8 error sequences in `input` and write to `output`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bdlde/Utf8Util/size_type.adoc[size&lowbar;type]
xref:BloombergLP/bdlde/Utf8Util/replaceErrors-09.adoc[replaceErrors](
    std::string* output,
    std::string&lowbar;view const& input,
    unsigned int utf32ErrorCode = k&lowbar;ERROR&lowbar;CODE&lowbar;POINT);
----

[.small]#xref:BloombergLP/bdlde/Utf8Util/replaceErrors-09.adoc[_» more&period;&period;&period;_]#

== Return Value

number of error sequences replaced (or deleted)

== Parameters

[cols="1,4"]
|===
| Name| Description
| *output*
| string that receives the corrected UTF&hyphen;8 result
| *input*
| UTF&hyphen;8 text that may contain error sequences
| *utf32ErrorCode*
| Unicode value substituted for each error
|===


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