BloombergLP::bdlde::Utf8Util::advanceIfValid

advanceIfValid overloads

Synopses

Declared in <bdlde_utf8util.h>

Advance past valid UTF-8 code points in a string_view.

static
Utf8Util::IntPtr
advanceIfValid(
    int* status,
    char const** result,
    std::string_view const& string,
    IntPtr numCodePoints);
» more...

Advance past valid UTF-8 code points in string.

static
IntPtr
advanceIfValid(
    int* status,
    char const** result,
    char const* string,
    IntPtr numCodePoints);
» more...

Advance past valid UTF-8 code points in a bounded string.

static
IntPtr
advanceIfValid(
    int* status,
    char const** result,
    char const* string,
    size_type length,
    IntPtr numCodePoints);
» more...

Return Value

number of Unicode code points traversed

Parameters

NameDescription
statusreceives 0 on success, or an ErrorStatus value
resultreceives address after the last valid code point
stringUTF-8 string view to advance through
numCodePointsmaximum number of code points to advance
lengthlength of string in bytes