Return whether string contains valid UTF-8.
Declared in <bdlde_utf8util.h>
static
bool
isValid(
char const** invalidString,
char const* string);
Return true if the specified string contains valid UTF-8, and false otherwise. If string contains invalid UTF-8, load into the specified invalidString the address of the beginning of the first invalid UTF-8 sequence encountered; invalidString is unaffected if string contains only valid UTF-8. string is necessarily null-terminated, so it cannot contain embedded null bytes.
true if string is valid UTF-8, and false otherwise
| Name | Description |
|---|---|
| invalidString | if non-null, set to the first invalid sequence |
| string | null-terminated UTF-8 input to validate |