ConvertUTF8toWide overloads

Synopses

Declared in <llvm/Support/ConvertUTF.h>

Converts a UTF‐8 StringRef to a std::wstring.

bool
ConvertUTF8toWide(
    llvm::StringRef Source,
    std::wstring& Result);

Converts a UTF‐8 C‐string to a std::wstring.

bool
ConvertUTF8toWide(
    char const* Source,
    std::wstring& Result);

Convert a UTF‐8 StringRef to UTF‐8, UTF‐16, or UTF‐32 by wide character width.

bool
ConvertUTF8toWide(
    unsigned int WideCharWidth,
    llvm::StringRef Source,
    char*& ResultPtr,
    UTF8 const*& ErrorPtr);

Return Value

true on success.

Parameters

Name

Description

Source

UTF‐8 encoded input string.

Result [out]

Converted wide string is stored here on success.

WideCharWidth

Width in bytes of each wide character (1, 2, or 4).

ResultPtr [inout]

Pointer to the output buffer; advanced past the converted data on success.

ErrorPtr [out]

Set to the first unconvertible character on failure.

Created with MrDocs