|
LLVM 22.0.0git
|
Utility class to convert between different character encodings. More...
#include "llvm/Support/TextEncoding.h"
Public Member Functions | |
| TextEncodingConverter (const TextEncodingConverter &)=delete | |
| TextEncodingConverter & | operator= (const TextEncodingConverter &)=delete |
| TextEncodingConverter (TextEncodingConverter &&Other) | |
| TextEncodingConverter & | operator= (TextEncodingConverter &&Other) |
| ~TextEncodingConverter ()=default | |
| std::error_code | convert (StringRef Source, SmallVectorImpl< char > &Result) const |
| Converts a string. | |
| ErrorOr< std::string > | convert (StringRef Source) const |
Static Public Member Functions | |
| static LLVM_ABI ErrorOr< TextEncodingConverter > | create (TextEncoding From, TextEncoding To) |
| Creates a TextEncodingConverter instance. | |
| static LLVM_ABI ErrorOr< TextEncodingConverter > | create (StringRef From, StringRef To) |
| Creates a TextEncodingConverter instance. | |
Utility class to convert between different character encodings.
Definition at line 82 of file TextEncoding.h.
|
delete |
|
inline |
Definition at line 111 of file TextEncoding.h.
References llvm::move(), and llvm::Other.
|
default |
Definition at line 131 of file TextEncoding.h.
|
inline |
Converts a string.
| [in] | Source | source string |
| [out] | Result | container for converted string |
Definition at line 126 of file TextEncoding.h.
|
static |
Creates a TextEncodingConverter instance.
Returns std::errc::invalid_argument in case the requested conversion is not supported.
| [in] | From | name of the source character encoding |
| [in] | To | name of the target character encoding |
Definition at line 322 of file TextEncoding.cpp.
References create(), getKnownEncoding(), and llvm::StringRef::str().
|
static |
Creates a TextEncodingConverter instance.
Returns std::errc::invalid_argument in case the requested conversion is not supported.
| [in] | From | the source character encoding |
| [in] | To | the target character encoding |
Definition at line 304 of file TextEncoding.cpp.
References Conversion, llvm::IBM1047, and llvm::UTF8.
Referenced by create().
|
delete |
|
inline |
Definition at line 114 of file TextEncoding.h.
References llvm::Other.