llvm::convertUTF16ToUTF8String

Converts a stream of raw bytes assumed to be UTF16 into a UTF8 std::string.

Synopsis

Declared in <llvm/Support/ConvertUTF.h>

bool
convertUTF16ToUTF8String(
    ArrayRef<char> SrcBytes,
    std::string& Out);

Return Value

true on success

Parameters

NameDescription
SrcBytes [in]A buffer of what is assumed to be UTF-16 encoded text.
Out [out]Converted UTF-8 is stored here on success.