Lines Matching defs:Text
68 getCommentSplit(StringRef Text, unsigned ContentStartColumn,
72 LLVM_DEBUG(llvm::dbgs() << "Comment split: \"" << Text
82 NumChars < MaxSplit && MaxSplitBytes < Text.size();) {
84 encoding::getCodePointNumBytes(Text[MaxSplitBytes], Encoding);
86 Text.substr(MaxSplitBytes, BytesInChar), ContentStartColumn + NumChars,
96 Text.find_first_of(Blanks, MaxSplitBytes);
97 if (SpaceOffset != StringRef::npos && SpaceOffset + 1 < Text.size() &&
98 Text[SpaceOffset + 1] == '{') {
103 StringRef::size_type SpaceOffset = Text.find_last_of(Blanks, MaxSplitBytes);
115 Text.find_last_not_of(Blanks, SpaceOffset);
116 if (LastNonBlank != StringRef::npos && Text[LastNonBlank] == '\\') {
117 SpaceOffset = Text.find_last_of(Blanks, LastNonBlank);
124 if (kNumberedListRegexp.match(Text.substr(SpaceOffset).ltrim(Blanks))) {
125 SpaceOffset = Text.find_last_of(Blanks, SpaceOffset);
130 if (Style.isJavaScript() && SpaceOffset + 1 < Text.size() &&
131 (Text[SpaceOffset + 1] == '{' || Text[SpaceOffset + 1] == '@')) {
132 SpaceOffset = Text.find_last_of(Blanks, SpaceOffset);
141 Text.find_last_not_of(Blanks, SpaceOffset) == StringRef::npos) {
144 StringRef::size_type FirstNonWhitespace = Text.find_first_not_of(Blanks);
149 SpaceOffset = Text.find_first_of(
157 if (SpaceOffset == 1 && Text[SpaceOffset - 1] == '*')
159 StringRef BeforeCut = Text.substr(0, SpaceOffset).rtrim(Blanks);
160 StringRef AfterCut = Text.substr(SpaceOffset);
171 getStringSplit(StringRef Text, unsigned UsedColumns, unsigned ColumnLimit,
174 if (Text.empty())
185 if (Text[0] == '\\') {
186 Advance = encoding::getEscapeSequenceLength(Text);
189 Advance = encoding::getCodePointNumBytes(Text[0], Encoding);
191 Text.substr(0, Advance), UsedColumns + Chars, TabWidth, Encoding);
194 if (Chars > MaxSplit || Text.size() <= Advance)
197 if (IsBlank(Text[0]))
199 if (Text[0] == '/')
201 if (Advance == 1 && !isAlphanumeric(Text[0]))
205 Text = Text.substr(Advance);
433 StringRef Text = Content[LineIndex].substr(TailOffset);
434 // Text is relative to the content line, but Whitespaces operates relative to
439 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first;
529 const StringRef &Text = Content[i];
532 if (Text.empty())
534 } else if (!Text.empty() && Decoration.starts_with(Text)) {
537 while (!Text.starts_with(Decoration))
715 StringRef Text = Content[LineIndex].substr(TailOffset);
722 Text.size() == Split.first + Split.second) {
731 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first;
1029 StringRef Text = Content[LineIndex].substr(TailOffset);
1033 Text.data() - tokenAt(LineIndex).TokenText.data() + Split.first;