Add method for detecting start of line
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1306322 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
93089b260c
commit
0fee01aa2d
|
@ -111,6 +111,16 @@ abstract class Lexer {
|
||||||
return (c == '\n' || c == '\r');
|
return (c == '\n' || c == '\r');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the current character represents the start of a line:
|
||||||
|
* a CR, LF or is at the start of the file.
|
||||||
|
*
|
||||||
|
* @param c
|
||||||
|
* @return true if the character is at the start of a line.
|
||||||
|
*/
|
||||||
|
boolean isStartOfLine(int c) {
|
||||||
|
return c == '\n' || c == '\r' || c == ExtendedBufferedReader.UNDEFINED;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @return true if the given character indicates end of file
|
* @return true if the given character indicates end of file
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue