ΒΆbool ConvertUTF8toWide(
unsigned int WideCharWidth,
llvm::StringRef Source,
char*& ResultPtr,
const llvm::UTF8*& ErrorPtr)
bool ConvertUTF8toWide(
unsigned int WideCharWidth,
llvm::StringRef Source,
char*& ResultPtr,
const llvm::UTF8*& ErrorPtr)
Description
Convert an UTF8 StringRef to UTF8, UTF16, or UTF32 depending on WideCharWidth. The converted data is written to ResultPtr, which needs to point to at least WideCharWidth * (Source.Size() + 1) bytes. On success, ResultPtr will point one after the end of the copied string. On failure, ResultPtr will not be changed, and ErrorPtr will be set to the location of the first character which could not be converted.
Declared at: llvm/include/llvm/Support/ConvertUTF.h:196
Parameters
- unsigned int WideCharWidth
- llvm::StringRef Source
- char*& ResultPtr
- const llvm::UTF8*& ErrorPtr
Returns
true on success.