Return the Unicode code‐point count in string.

Synopsis

Declared in <bdlde_utf8util.h>

static
IntPtr
numCodePointsRaw(
    char const* string,
    size_type length);

Description

string need not be null‐terminated and can contain embedded null bytes, and string may be null if 0 == length (see {Empty Input Strings}). The behavior is undefined unless string contains valid UTF‐8. Note that string may contain less than length Unicode code points.

Return Value

number of Unicode code points in string

Parameters

Name

Description

string

UTF‐8 byte sequence (need not be null‐terminated)

length

length of string in bytes

Created with MrDocs