Lines Matching refs:Text
34 inline Encoding detectEncoding(StringRef Text) { in detectEncoding() argument
35 const UTF8 *Ptr = reinterpret_cast<const UTF8 *>(Text.begin()); in detectEncoding()
36 const UTF8 *BufEnd = reinterpret_cast<const UTF8 *>(Text.end()); in detectEncoding()
42 inline unsigned getCodePointCountUTF8(StringRef Text) { in getCodePointCountUTF8() argument
44 for (size_t i = 0, e = Text.size(); i < e; i += getNumBytesForUTF8(Text[i])) { in getCodePointCountUTF8()
52 inline unsigned getCodePointCount(StringRef Text, Encoding Encoding) { in getCodePointCount() argument
55 return getCodePointCountUTF8(Text); in getCodePointCount()
57 return Text.size(); in getCodePointCount()
64 inline unsigned columnWidth(StringRef Text, Encoding Encoding) { in columnWidth() argument
66 int ContentWidth = llvm::sys::unicode::columnWidthUTF8(Text); in columnWidth()
74 return Text.size(); in columnWidth()
80 inline unsigned columnWidthWithTabs(StringRef Text, unsigned StartColumn, in columnWidthWithTabs() argument
83 StringRef Tail = Text; in columnWidthWithTabs()
115 inline unsigned getEscapeSequenceLength(StringRef Text) { in getEscapeSequenceLength() argument
116 assert(Text[0] == '\\'); in getEscapeSequenceLength()
117 if (Text.size() < 2) in getEscapeSequenceLength()
120 switch (Text[1]) { in getEscapeSequenceLength()
127 while (I < Text.size() && isHexDigit(Text[I])) in getEscapeSequenceLength()
132 if (isOctDigit(Text[1])) { in getEscapeSequenceLength()
134 while (I < Text.size() && I < 4 && isOctDigit(Text[I])) in getEscapeSequenceLength()
138 return 1 + getNumBytesForUTF8(Text[1]); in getEscapeSequenceLength()