public class Seek extends Object
| Constructor and Description |
|---|
Seek() |
| Modifier and Type | Method and Description |
|---|---|
static int |
countPrevToken(String txt,
int off,
String tkn)
count the token occurrences form offset (backward)
|
static int |
indent(CharSequence text,
int end) |
static boolean |
isAlnum(char c) |
static boolean |
isSplit(char c) |
static boolean |
isWhite(char c) |
static boolean |
notBlank(char c) |
static boolean |
notWhite(char c) |
static int |
seekFollow(String txt,
int off,
int end,
String tkn) |
static int[] |
seekNextAlnum(CharSequence txt,
int off,
int end) |
static int |
seekNextEdge(CharSequence txt,
int off)
the right of edge (include `\n`), index is end
|
static int |
seekNextGrace(CharSequence txt,
int off,
int end) |
static int |
seekNextSplit(CharSequence txt,
int off,
int end) |
static int[] |
seekNextToken(String txt,
int off,
int end,
String tkn,
String esc)
find next token (no escape) and escaped count (forward)
|
static int |
seekNextWhite(CharSequence txt,
int off,
int end) |
static int[] |
seekNextWords(CharSequence txt,
int off,
int end) |
static int |
seekPrevEdge(CharSequence txt,
int end)
the left of edge (exclude `\n`), index is start
|
static int |
seekPrevGrace(CharSequence txt,
int off,
int end) |
static int[] |
seekPrevToken(String txt,
int off,
int end,
String tkn,
String esc)
find prev token (no escape) and escaped count (backward)
|
static int |
seekPrevWhite(CharSequence txt,
int off,
int end) |
static int[] |
seekPrevWords(CharSequence txt,
int off,
int end) |
static int |
seekToken(String txt,
int off,
int end,
String tkn,
boolean echo)
Find `token` string within a range between `off` and `end`.
|
static int[] |
trimBlank(CharSequence txt,
int off,
int end) |
public static int seekToken(String txt, int off, int end, String tkn, boolean echo)
txt - the source stringoff - offset (include)end - the end (exclude)tkn - tokenecho - whether repetition charpublic static int seekPrevGrace(CharSequence txt, int off, int end)
public static int seekNextGrace(CharSequence txt, int off, int end)
public static int seekPrevWhite(CharSequence txt, int off, int end)
public static int seekNextWhite(CharSequence txt, int off, int end)
public static int[] seekPrevWords(CharSequence txt, int off, int end)
public static int[] seekNextWords(CharSequence txt, int off, int end)
public static int seekNextSplit(CharSequence txt, int off, int end)
public static int[] seekNextAlnum(CharSequence txt, int off, int end)
public static int[] trimBlank(CharSequence txt, int off, int end)
public static int seekPrevEdge(CharSequence txt, int end)
txt - source stringend - end (exclude)public static int seekNextEdge(CharSequence txt, int off)
txt - the source stringoff - offset (include)public static boolean isAlnum(char c)
public static boolean isSplit(char c)
public static boolean isWhite(char c)
public static boolean notWhite(char c)
public static boolean notBlank(char c)
public static int indent(CharSequence text, int end)
public static int countPrevToken(String txt, int off, String tkn)
txt - the source stringoff - offset (include)tkn - tokenpublic static int[] seekPrevToken(String txt, int off, int end, String tkn, String esc)
txt - the source stringoff - offset (include)end - end (exclude)tkn - tokenesc - escape charpublic static int[] seekNextToken(String txt, int off, int end, String tkn, String esc)
txt - the source stringoff - offset (include)end - end (exclude)tkn - tokenesc - escape charCopyright © 2024. All rights reserved.