Lines Matching refs:lastIndex
552 int lastIndex = startIndex;
556 if (newlineIndex > lastIndex) {
557 output(chars, lastIndex, newlineIndex - lastIndex);
560 lastIndex = newlineIndex + 1;
561 newlineIndex = indexOf(chars, '\n', lastIndex, endIndex);
563 if (lastIndex < endIndex) {
564 output(chars, lastIndex, endIndex - lastIndex);
569 int lastIndex = startIndex;
574 while (lastIndex < endIndex) {
575 int newlineIndex = indexOf(chars, NEWLINE, lastIndex,
582 (newlineIndex - lastIndex)) < maxLength) {
583 if (newlineIndex > lastIndex) {
584 output(chars, lastIndex, newlineIndex - lastIndex);
586 lastIndex = newlineIndex + 1;
590 (endIndex - lastIndex)) < maxLength) {
591 if (endIndex > lastIndex) {
592 output(chars, lastIndex, endIndex - lastIndex);
594 lastIndex = endIndex;
598 // from lastIndex to endIndex,
601 int maxBreak = Math.min(endIndex - lastIndex,
606 lastIndex])) {
613 breakPoint += lastIndex + 1;
614 output(chars, lastIndex, breakPoint - lastIndex);
615 lastIndex = breakPoint;
626 maxBreak = endIndex - lastIndex;
629 lastIndex])) {
636 output(chars, lastIndex, endIndex - lastIndex);
640 breakPoint += lastIndex;
642 output(chars, lastIndex, breakPoint++ -
643 lastIndex);
647 output(chars, lastIndex, ++breakPoint -
648 lastIndex);
652 lastIndex = breakPoint;
655 if (forceNewLine || needsNewline || lastIndex < endIndex) {
657 if (lastIndex < endIndex || !forceNewLine) {