BloombergLP::bdlde::Utf8Util::numCodePointsIfValid

numCodePointsIfValid overloads

Synopses

Declared in <bdlde_utf8util.h>

Return the Unicode code-point count if string is valid UTF-8.

static
IntPtr
numCodePointsIfValid(
    char const** invalidString,
    std::string_view const& string);
» more...

Return the Unicode code-point count if string is valid UTF-8.

static
IntPtr
numCodePointsIfValid(
    char const** invalidString,
    char const* string);
» more...

Return the Unicode code-point count if a bounded string is valid.

static
IntPtr
numCodePointsIfValid(
    char const** invalidString,
    char const* string,
    size_type length);
» more...

Return Value

code-point count on success, or an ErrorStatus value

Parameters

NameDescription
invalidStringif non-null, set to after the last valid code point
stringUTF-8 string view to examine
lengthlength of string in bytes