Returns true if S is valid UTF-8, which is required for use as JSON.
Declared in <llvm/Support/JSON.h>
bool
isUTF8(
llvm::StringRef S,
size_t* ErrOffset = nullptr);
If it returns false, Offset is set to a byte offset near the first error.
True if S is valid UTF-8.
| Name | Description |
|---|---|
| S | String to validate. |
| ErrOffset | Optional output for a byte offset near the first error. |