BloombergLP::bdlde::Utf8Util::isValid

Return true if the specified string contains only valid UTF-8 characters, and false otherwise. If string contains invalid UTF-8, load into the specified invalidString the address of the byte after the last valid code point traversed; invalidString is unaffected if string contains only valid UTF-8. string need not be null-terminated and can contain embedded null bytes.

Synopsis

Declared in <bdlde_utf8util.h>

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