36 return UCS == 0x00AD || Printables.
contains(UCS);
43 return Format.contains(UCS);
64 if (CombiningCharacters.
contains(UCS))
70 if (DoubleWidthCharacters.
contains(UCS))
78 unsigned ColumnWidth = 0;
80 for (
size_t i = 0, e =
Text.size(); i < e; i +=
Length) {
94 const UTF8 *Start =
reinterpret_cast<const UTF8 *
>(
Text.data() + i);
102 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
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...
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 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.
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)