BloombergLP::bdlde::Utf8Util::replaceErrors

Replace UTF-8 error sequences in input and write to output.

Synopsis

Declared in <bdlde_utf8util.h>

static
size_type
replaceErrors(
    std::pmr::string* output,
    std::string_view const& input,
    unsigned int utf32ErrorCode = k_ERROR_CODE_POINT);

Description

Same as the overload taking bsl::string.

Return Value

number of error sequences replaced (or deleted)

Parameters

NameDescription
outputstring that receives the corrected UTF-8 result
inputUTF-8 text that may contain error sequences
utf32ErrorCodeUnicode value substituted for each error