public class StringPartScanLineCol extends StringPartScan
posLineStart is filled with the position after '\n'.
This takes a little while, iteration through the text.
Then all information for getline() and getlineCol() are given, see there.StringPart.Iter, StringPart.Part| Modifier and Type | Field and Description |
|---|---|
(package private) int[] |
posLineStart |
beginScan, beginScanLast, nLastFloatNumber, nLastIntegerNumber, nLastIntegerSign, sLastString, sVersionabsPos0, bCurrentOk, begiMin, begin, beginLast, bFound, bitMode, bStartScan, content, end, endLast, endMax, mSeekBack, mSeekCheck, mSeekEnd, mSeekToLeft, mSkipOverCommentInsideText_mode, mSkipOverCommentToEol_mode, mSkipOverWhitespace_mode, sCheckNewline, sCheckWhitespaces, sCommentEnd, sCommentStart, sCommentToEol, seekBack, seekEnd, seekNormal, seekToLeft, sFile| Constructor and Description |
|---|
StringPartScanLineCol(java.lang.CharSequence text) |
| Modifier and Type | Method and Description |
|---|---|
private int |
binarySearch(int pos) |
int |
getline() |
int[] |
getlineCol()
returns the line and column of the current position.
|
static void |
main(java.lang.String[] args)
Only for particular debug test
|
close, getCircumScriptionToAnyChar, getCircumScriptionToAnyCharOutsideQuotion, getLastScannedFloatNumber, getLastScannedIntegerNumber, getLastScannedIntegerSign, getLastScannedPart, getLastScannedPart, getLastScannedString, readNextContent, scan, scan, scanAnyChar, scanChar, scanDigits, scanDigits, scanFloatNumber, scanFloatNumber, scanFloatNumber, scanFractionalExponent, scanFractionalNumber, scanHex, scanHex, scanHexOrDecimal, scanHexOrDecimal, scanIdentifier, scanIdentifier, scanInteger, scanInteger, scanInteger, scanLiteral, scanOk, scanPositivInteger, scanQuotion, scanQuotion, scanSkipComment, scanSkipSpace, scanStart, scanStart, scanToAnyChar, scanToAnyChar, scanToStringEnd, seekScanPosabsCharAt, absSubString, assign, assign, assignFromEnd, assignReplaceEnv, charAt, checkCharAt, clean, compareTo, contentTillSpaceEndOrQuotation, debugString, equals, firstlineMaxpart, found, fromEnd, getCharSequenceRange, getCurrent, getCurrent, getCurrentChar, getCurrentColumn, getCurrentPart, getCurrentPart, getCurrentPosition, getInputfile, getLastPart, getLenCurrent, getLineAndColumn, getPart, indexEndOfQuotation, indexEndOfQuotation, indexEndOfQuotion, indexOf, indexOf, indexOf, indexOf, indexOfAnyChar, indexOfAnyChar, indexOfAnyChar, indexOfAnyCharOutsideQuotation, indexOfAnyCharOutsideQuotion, indexOfAnyString, indexOfNoChar, indexOfNoChar, iterator, lastIndexOfAnyChar, len0end, lenBacktoNoChar, lenBacktoNoWhiteSpaces, length, lengthMaxPart, lento, lento, lento, lento, lentoAnyChar, lentoAnyChar, lentoAnyChar, lentoAnyCharOutsideQuotation, lentoAnyCharOutsideQuotion, lentoAnyNonEscapedChar, lentoAnyString, lentoAnyString, lentoAnyStringWithIndent, lentoIdentifier, lentoIdentifier, lentoLineEnd, lentoMax, lentoNonEscapedString, lentoNumber, lentoPos, lentoQuotionEnd, line, nextlineMaxpart, replace, seek, seek, seek, seek, seekAfterNewline, seekAnyChar, seekAnyString, seekBackToAnyChar, seekBackward, seekBegin, seekCheck, seekCheckEnd, seekEnd, seekNextLine, seekNoChar, seekNoWhitespace, seekNoWhitespaceOrComments, seekPos, seekPosBack, setBeginMaxPart, setCurrentMaxPart, setCurrentPartTo, setCurrentPosition, setIgnoreComment, setIgnoreComment, setIgnoreEndlineComment, setIgnoreEndlineComment, setIgnoreWhitespaces, setInputfile, setLengthMax, setParttoMax, skipWhitespaceAndComment, startsWith, subSequence, substring, toString, trim, trimComment, trimWhiteSpaces, XXXindexOfprivate int binarySearch(int pos)
public int[] getlineCol()
StringPart.begin
this position is searched in posLineStart using binary search. It is fast.public int getline()
public static void main(java.lang.String[] args)
args - not used