@Deprecated public final class StringParser extends Object
findXxxx()
and
skipXxxx()
families of methods to remember significant
offsets. To retrieve the parsed substrings, call the extract()
method with the appropriate saved offset values.Constructor and Description |
---|
StringParser()
Deprecated.
Construct a string parser with no preset string to be parsed.
|
StringParser(String string)
Deprecated.
Construct a string parser that is initialized to parse the specified
string.
|
Modifier and Type | Method and Description |
---|---|
void |
advance()
Deprecated.
Advance the current parsing position by one, if we are not already
past the end of the string.
|
String |
extract(int start,
int end)
Deprecated.
Extract and return a substring that starts at the specified position,
and ends at the character before the specified position.
|
int |
findChar(char ch)
Deprecated.
Return the index of the next occurrence of the specified character,
or the index of the character after the last position of the string
if no more occurrences of this character are found.
|
int |
getIndex()
Deprecated.
Return the zero-relative index of our current parsing position
within the string being parsed.
|
int |
getLength()
Deprecated.
Return the length of the string we are parsing.
|
void |
reset()
Deprecated.
Reset the current state of the parser to the beginning of the
current string being parsed.
|
void |
setString(String string)
Deprecated.
Set the String we are currently parsing.
|
public StringParser()
public StringParser(String string)
string
- The string to be parsedpublic int getIndex()
public int getLength()
public void setString(String string)
string
- The string to be parsed.public void advance()
public String extract(int start, int end)
start
- Starting index, zero relative, inclusiveend
- Ending index, zero relative, exclusivepublic int findChar(char ch)
ch
- Character to be foundpublic void reset()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.