ΒΆbool isUTF8(llvm::StringRef S,
            size_t* ErrOffset = nullptr)

Description

Returns true if \p S is valid UTF-8, which is required for use as JSON. If it returns false, \p Offset is set to a byte offset near the first error.

Declared at: llvm/include/llvm/Support/JSON.h:78

Parameters

llvm::StringRef S
size_t* ErrOffset = nullptr