ΒΆstd::string fixUTF8(llvm::StringRef S)

Description

Replaces invalid UTF-8 sequences in \p S with the replacement character (U+FFFD). The returned string is valid UTF-8. This is much slower than isUTF8, so test that first.

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

Parameters

llvm::StringRef S