org.freecompany.util.text
public class Tokenizer extends Scanner
Method Summary | |
---|---|
static CharSequence | after(TokenizerState state, CharSequence sequence)
Retrieves the remaining characters after the provided sequence, starting at the current position. |
static CharSequence | after(CharSequence target, CharSequence sequence)
Retrieves the remaining characters after the provided sequence.
|
static CharSequence | after(CharSequence target, int index)
Retrieves the remaining characters after the provided index.
|
static CharSequence | after(CharSequence target, CharSequence sequence, boolean trim)
Retrieves the remaining characters after the provided sequence, optionally trimming the results.
|
static CharSequence | after(CharSequence target, int start, boolean trim)
Retrieves the remaining characters after the provided index, optionally trimming the results.
|
static CharSequence | before(TokenizerState state, CharSequence sequence)
Retrieves the characters preceeding the provided sequence, starting at the current position. |
static CharSequence | before(CharSequence target, CharSequence sequence)
Retrieves the characters preceeding the provided sequence.
|
static CharSequence | before(CharSequence target, CharSequence sequence, boolean trim)
Retrieves the characters preceeding the provided sequence, optionally trimming the resulting sequence.
|
static CharSequence | before(CharSequence target, int start)
Convenience method for returning the untrimmed portion of a sequence up to the provided index. |
static CharSequence | before(CharSequence target, int start, boolean trim)
Retrieves the characters preceding the provided index, optionally trimming the results.
|
static CharSequence | between(TokenizerState state, CharSequence one, CharSequence two)
Retrieves the next token that falls between the two provided sequences, starting at the current position. |
static CharSequence | between(CharSequence target, CharSequence one, CharSequence two)
Retrieves the next token that falls between the two provided sequences.
|
static CharSequence | between(CharSequence target, CharSequence one, CharSequence two, boolean trim)
Retrieves the next token that falls between the two provided sequences, optionally trimming the results.
|
static CharSequence | rest(TokenizerState state)
Retrieves the remaining characters from this tokenizer. |
protected static CharSequence | sub(CharSequence target, int start, int end, boolean trim) |
Returns: the characters remaining after the sequence, or null if the sequence is not found.
Returns: the characters remaining after the sequence, or null if the sequence is not found.
Returns: the characters remaining after the sequence, or null if the sequence is not found.
Returns: the characters remaining after the sequence, or null if the sequence is not found.
Returns: the characters remaining after the sequence, or null if the sequence is not found.
Returns: the characters preceeding the sequence, or null if the sequence is not found. Retrieves the next token delimited by the provided sequence.
Returns: the characters preceeding the sequence, or null if the sequence is not found.
Returns: the characters preceeding the sequence, or null if the sequence is not found.
before
with false as the last parameter.Returns: the characters remaining after the sequence, or null if the sequence is not found.
Returns: the characters between the two sequences, or null if either sequence is not found.
Returns: the characters between the two sequences, or null if either sequence is not found.
Returns: the characters between the two sequences, or null if either sequence is not found.