Lines Matching refs:Text

35 inline Encoding detectEncoding(StringRef Text) {  in detectEncoding()  argument
36 const UTF8 *Ptr = reinterpret_cast<const UTF8 *>(Text.begin()); in detectEncoding()
37 const UTF8 *BufEnd = reinterpret_cast<const UTF8 *>(Text.end()); in detectEncoding()
43 inline unsigned getCodePointCountUTF8(StringRef Text) { in getCodePointCountUTF8() argument
45 for (size_t i = 0, e = Text.size(); i < e; i += getNumBytesForUTF8(Text[i])) { in getCodePointCountUTF8()
53 inline unsigned getCodePointCount(StringRef Text, Encoding Encoding) { in getCodePointCount() argument
56 return getCodePointCountUTF8(Text); in getCodePointCount()
58 return Text.size(); in getCodePointCount()
65 inline unsigned columnWidth(StringRef Text, Encoding Encoding) { in columnWidth() argument
67 int ContentWidth = llvm::sys::unicode::columnWidthUTF8(Text); in columnWidth()
75 return Text.size(); in columnWidth()
81 inline unsigned columnWidthWithTabs(StringRef Text, unsigned StartColumn, in columnWidthWithTabs() argument
84 StringRef Tail = Text; in columnWidthWithTabs()
116 inline unsigned getEscapeSequenceLength(StringRef Text) { in getEscapeSequenceLength() argument
117 assert(Text[0] == '\\'); in getEscapeSequenceLength()
118 if (Text.size() < 2) in getEscapeSequenceLength()
121 switch (Text[1]) { in getEscapeSequenceLength()
128 while (I < Text.size() && isHexDigit(Text[I])) in getEscapeSequenceLength()
133 if (isOctDigit(Text[1])) { in getEscapeSequenceLength()
135 while (I < Text.size() && I < 4 && isOctDigit(Text[I])) in getEscapeSequenceLength()
139 return 1 + getNumBytesForUTF8(Text[1]); in getEscapeSequenceLength()