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

`replaceErrors` overloads

== Synopses

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

Translate the specified `input`, which is UTF&hyphen;8, replacing error sequences in `input` with `utf32ErrorCode` translated to UTF&hyphen;8, and return the number of errors found, putting the result in `&ast;output`&period; Any previous contents of `&ast;output` are discarded&period; If `utf32ErrorCode` is 0, error sequences will be simply deleted&period; The behavior is undefined unless `utf32ErrorCode` is a valid unicode value for UTF&hyphen;8&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;_]#

Same as the overload taking `bsl&colon;&colon;string`&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;_]#

Same as the overload taking `bsl&colon;&colon;string`&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;_]#


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