Lines Matching refs:Text
66 static BreakableToken::Split getCommentSplit(StringRef Text, in getCommentSplit() argument
72 LLVM_DEBUG(llvm::dbgs() << "Comment split: \"" << Text in getCommentSplit()
82 NumChars < MaxSplit && MaxSplitBytes < Text.size();) { in getCommentSplit()
84 encoding::getCodePointNumBytes(Text[MaxSplitBytes], Encoding); in getCommentSplit()
86 encoding::columnWidthWithTabs(Text.substr(MaxSplitBytes, BytesInChar), in getCommentSplit()
91 StringRef::size_type SpaceOffset = Text.find_last_of(Blanks, MaxSplitBytes); in getCommentSplit()
97 if (kNumberedListRegexp->match(Text.substr(SpaceOffset).ltrim(Blanks))) in getCommentSplit()
98 SpaceOffset = Text.find_last_of(Blanks, SpaceOffset); in getCommentSplit()
103 SpaceOffset + 1 < Text.size() && Text[SpaceOffset + 1] == '{') in getCommentSplit()
104 SpaceOffset = Text.find_last_of(Blanks, SpaceOffset); in getCommentSplit()
111 Text.find_last_not_of(Blanks, SpaceOffset) == StringRef::npos) { in getCommentSplit()
114 StringRef::size_type FirstNonWhitespace = Text.find_first_not_of(Blanks); in getCommentSplit()
118 SpaceOffset = Text.find_first_of( in getCommentSplit()
126 if (SpaceOffset == 1 && Text[SpaceOffset - 1] == '*') in getCommentSplit()
128 StringRef BeforeCut = Text.substr(0, SpaceOffset).rtrim(Blanks); in getCommentSplit()
129 StringRef AfterCut = Text.substr(SpaceOffset).ltrim(Blanks); in getCommentSplit()
137 getStringSplit(StringRef Text, unsigned UsedColumns, unsigned ColumnLimit, in getStringSplit() argument
140 if (Text.empty()) in getStringSplit()
151 if (Text[0] == '\\') { in getStringSplit()
152 Advance = encoding::getEscapeSequenceLength(Text); in getStringSplit()
155 Advance = encoding::getCodePointNumBytes(Text[0], Encoding); in getStringSplit()
157 Text.substr(0, Advance), UsedColumns + Chars, TabWidth, Encoding); in getStringSplit()
160 if (Chars > MaxSplit || Text.size() <= Advance) in getStringSplit()
163 if (IsBlank(Text[0])) in getStringSplit()
165 if (Text[0] == '/') in getStringSplit()
167 if (Advance == 1 && !isAlphanumeric(Text[0])) in getStringSplit()
171 Text = Text.substr(Advance); in getStringSplit()
285 StringRef Text = Content[LineIndex].substr(TailOffset); in compressWhitespace() local
291 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in compressWhitespace()
558 StringRef Text = Content[LineIndex].substr(TailOffset); in insertBreak() local
565 Text.size() == Split.first + Split.second) { in insertBreak()
574 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in insertBreak()
816 StringRef Text = Content[LineIndex].substr(TailOffset); in insertBreak() local
820 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first; in insertBreak()