Home | History | Annotate | Download | only in Format

Lines Matching defs:Text

42 static BreakableToken::Split getCommentSplit(StringRef Text,
54 NumChars < MaxSplit && MaxSplitBytes < Text.size();) {
56 encoding::getCodePointNumBytes(Text[MaxSplitBytes], Encoding);
58 encoding::columnWidthWithTabs(Text.substr(MaxSplitBytes, BytesInChar),
63 StringRef::size_type SpaceOffset = Text.find_last_of(Blanks, MaxSplitBytes);
66 Text.find_last_not_of(Blanks, SpaceOffset) == StringRef::npos) {
69 StringRef::size_type FirstNonWhitespace = Text.find_first_not_of(Blanks);
73 SpaceOffset = Text.find_first_of(
77 StringRef BeforeCut = Text.substr(0, SpaceOffset).rtrim(Blanks);
78 StringRef AfterCut = Text.substr(SpaceOffset).ltrim(Blanks);
86 getStringSplit(StringRef Text, unsigned UsedColumns, unsigned ColumnLimit,
89 if (Text.empty())
100 if (Text[0] == '\\') {
101 Advance = encoding::getEscapeSequenceLength(Text);
104 Advance = encoding::getCodePointNumBytes(Text[0], Encoding);
106 Text.substr(0, Advance), UsedColumns + Chars, TabWidth, Encoding);
109 if (Chars > MaxSplit || Text.size() <= Advance)
112 if (IsBlank(Text[0]))
114 if (Text[0] == '/')
116 if (Advance == 1 && !isAlphanumeric(Text[0]))
120 Text = Text.substr(Advance);
337 // Calculate the end of the non-whitespace text in the previous line.
344 // Calculate the start of the non-whitespace text in the current line.
350 // Adjust Lines to only contain relevant text.
388 StringRef Text = Lines[LineIndex].substr(TailOffset);
391 Text.size() == Split.first + Split.second) {
397 Text.data() - Tok.TokenText.data() + Split.first;
408 StringRef Text = Lines[LineIndex].substr(TailOffset);
410 Text.data() - Tok.TokenText.data() + Split.first;