public class TextTokenization extends Object
| Modifier and Type | Method and Description |
|---|---|
static int |
find(CharSequence text,
int start,
CharPredicate predicate)
Find the index after or at the given start that matches the predicate.
|
static TokenType |
findBestTokenType(CharSequence text)
Find the best token type for the given text.
|
static int |
findNext(CharSequence text,
int start,
CharPredicate predicate)
Find the index after the given start that matches the predicate.
|
static int |
findNextNonWhitespace(CharSequence text,
int start)
Find the index of the first non-whitespace character following the given start index.
|
static int |
findNextWhitespace(CharSequence text,
int start)
Find the index of the first whitespace character following the given start index.
|
static int |
findNonWhitespace(CharSequence text,
int start)
Find the index where the first non-whitespace character is available, either at the given start of after it.
|
static int |
findPreviousNonWhitespace(CharSequence text,
int start)
Find the index of the first non-whitespace character preceding the given start index.
|
static int |
findPreviousWhitespace(CharSequence text,
int start)
Find the index of the first whitespace character preceding the given start index.
|
static int |
findWhitespace(CharSequence text,
int start)
Find the index where the first whitespace character is available, either at the given start of after it.
|
public static TokenType findBestTokenType(CharSequence text)
text - public static int find(CharSequence text, int start, CharPredicate predicate)
text - start - predicate - public static int findNext(CharSequence text, int start, CharPredicate predicate)
text - start - predicate - public static int findNonWhitespace(CharSequence text, int start)
text - text to search instart - starting offset-1 if not foundpublic static int findWhitespace(CharSequence text, int start)
text - text to search instart - starting offset-1 if not foundpublic static int findNextNonWhitespace(CharSequence text, int start)
text - text to search instart - starting offset-1 if not foundpublic static int findNextWhitespace(CharSequence text, int start)
text - text to search instart - starting offset-1 if not foundpublic static int findPreviousNonWhitespace(CharSequence text, int start)
text - text to search instart - starting offset-1 if not foundpublic static int findPreviousWhitespace(CharSequence text, int start)
text - text to search instart - starting offset-1 if not foundCopyright © 2018. All rights reserved.