LLVM: lib/Support/TextEncoding.cpp File Reference (original) (raw)
This file provides utility classes to convert between different character encodings. More...
#include "[llvm/Support/TextEncoding.h](TextEncoding%5F8h%5Fsource.html)"#include "[llvm/ADT/SmallString.h](SmallString%5F8h%5Fsource.html)"#include "[llvm/ADT/SmallVector.h](SmallVector%5F8h%5Fsource.html)"#include "[llvm/ADT/StringExtras.h](StringExtras%5F8h%5Fsource.html)"#include "[llvm/Support/ConvertEBCDIC.h](ConvertEBCDIC%5F8h%5Fsource.html)"#include <system_error>
Go to the source code of this file.
| Functions | |
|---|---|
| static void | normalizeCharSetName (StringRef CSName, SmallVectorImpl< char > &Normalized) |
| static std::optional< TextEncoding > | getKnownEncoding (StringRef Name) |
| static void | HandleOverflow (size_t &Capacity, char *&Output, size_t &OutputLength, SmallVectorImpl< char > &Result) |
Detailed Description
This file provides utility classes to convert between different character encodings.
Definition in file TextEncoding.cpp.
Function Documentation
◆ getKnownEncoding()
| std::optional< TextEncoding > getKnownEncoding ( StringRef Name) | static |
|---|
Definition at line 47 of file TextEncoding.cpp.
References llvm::SmallString< InternalLen >::equals(), llvm::IBM1047, normalizeCharSetName(), and llvm::UTF8.
Referenced by llvm::TextEncodingConverter::create().
◆ HandleOverflow()
| void HandleOverflow ( size_t & Capacity, char *& Output, size_t & OutputLength, SmallVectorImpl< char > & Result ) | static |
|---|
Definition at line 57 of file TextEncoding.cpp.
◆ normalizeCharSetName()
| void normalizeCharSetName ( StringRef CSName, SmallVectorImpl< char > & Normalized ) | static |
|---|
Definition at line 32 of file TextEncoding.cpp.
References llvm::isAlnum(), llvm::isDigit(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), and llvm::toLower().
Referenced by getKnownEncoding().