isValid overloads

Synopses

Declared in <bdlde_utf8util.h>

Return whether string contains valid UTF‐8.

static
bool
isValid(std::string_view const& string);

Return whether string contains valid UTF‐8.

static
bool
isValid(char const* string);

Return whether a bounded string contains valid UTF‐8.

static
bool
isValid(
    char const* string,
    size_type length);

Return whether string contains only valid UTF‐8 characters.

static
bool
isValid(
    char const** invalidString,
    std::string_view const& string);

Return whether string contains valid UTF‐8.

static
bool
isValid(
    char const** invalidString,
    char const* string);

Return whether a bounded string contains valid UTF‐8.

static
bool
isValid(
    char const** invalidString,
    char const* string,
    size_type length);

Return Value

true if string is valid UTF‐8, and false otherwise

Parameters

Name

Description

string

UTF‐8 string view to validate

length

length of string in bytes

invalidString

if non‐null, set to after the last valid code point

Created with MrDocs