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

Synopses

Declared in <bdlde_utf8util.h>

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

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

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

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

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

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

Return Value

number of error sequences replaced (or deleted)

Parameters

Name

Description

output

string that receives the corrected UTF‐8 result

input

UTF‐8 text that may contain error sequences

utf32ErrorCode

Unicode value substituted for each error

Created with MrDocs