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);

Advance past valid UTF‐8 code points in string.

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

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);

Return Value

number of Unicode code points traversed

Parameters

Name

Description

status

receives 0 on success, or an ErrorStatus value

result

receives address after the last valid code point

string

UTF‐8 string view to advance through

numCodePoints

maximum number of code points to advance

length

length of string in bytes

Created with MrDocs