BloombergLP::bdlde::Utf8Util::isValid

Return whether string contains valid UTF-8.

Synopsis

Declared in <bdlde_utf8util.h>

static
bool
isValid(char const* string);

Description

Return true if the specified string contains valid UTF-8, and false otherwise. string is necessarily null-terminated, so it cannot contain embedded null bytes.

Return Value

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

Parameters

NameDescription
stringnull-terminated UTF-8 input to validate