47 return UCS == 0x00AD || Printables.
contains(UCS);
61 return Format.contains(UCS);
82 if (CombiningCharacters.
contains(UCS))
88 if (DoubleWidthCharacters.
contains(UCS))
96 unsigned ColumnWidth = 0;
98 for (
size_t i = 0, e =
Text.size(); i < e; i +=
Length) {
112 const UTF8 *Start =
reinterpret_cast<const UTF8 *
>(
Text.data() + i);
120 ColumnWidth += Width;
Represent a constant reference to a string, i.e.
Target - Wrapper for Target specific information.
Holds a reference to an ordered array of UnicodeCharRange and allows to quickly check if a code point...
bool contains(uint32_t C) const
Returns true if the character set contains the Unicode code point C.
ArrayRef< UnicodeCharRange > CharRanges
@ ErrorNonPrintableCharacter
const UnicodeCharSet::CharRanges GeneratedDoubleWidthCharacterRanges
const UnicodeCharSet::CharRanges GeneratedCharacterRanges
static bool isprintableascii(char c)
LLVM_ABI int columnWidthUTF8(StringRef Text)
Gets the number of positions the UTF8-encoded Text is likely to occupy when output on a terminal ("ch...
LLVM_ABI bool isCharacter(int UCS)
Unicode code points that are considered characters.
const UnicodeCharSet::CharRanges GeneratedFormatCharacterRanges
const UnicodeCharSet::CharRanges GeneratedCombiningCharacterRanges
const UnicodeCharSet::CharRanges GeneratedPrintableRanges
static int charWidth(int UCS)
Gets the number of positions a character is likely to occupy when output on a terminal ("character wi...
LLVM_ABI bool isControl(int UCS)
Unicode code points of the Cc category are considered control characters.
LLVM_ABI bool isFormatting(int UCS)
Unicode code points of the Cf category are considered formatting characters.
LLVM_ABI bool isPrintable(int UCS)
Determines if a character is likely to be displayed correctly on the terminal.
const UnicodeCharSet::CharRanges GeneratedControlCharacterRanges
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI ConversionResult ConvertUTF8toUTF32(const UTF8 **sourceStart, const UTF8 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags flags)
Convert a partial UTF8 sequence to UTF32.
LLVM_ABI unsigned getNumBytesForUTF8(UTF8 firstByte)