Return the number of Unicode code points in the specified string if string contains valid UTF‐8, with no effect on the specified invalidString. Otherwise, return a value from the ErrorStatus enum (which are all negative) and load into invalidString the address of the byte after the last valid Unicode code point traversed. string need not be null‐terminated and may contain embedded null bytes.

Synopsis

Declared in <bdlde_utf8util.h>

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

Created with MrDocs