public class TextUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static char[] |
wordBreakers
Array of word breakers which used to split string into words.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
cpToStr(int cp)
Used to convert character codepoint to string.
|
static int |
findNextWord(java.lang.String text,
int current)
Used to find next word start index from current character index in provided string.
|
static int |
findPrevWord(java.lang.String text,
int current)
Used to find previous word start index from current character index in provided string.
|
public static final char[] wordBreakers
public static int findNextWord(java.lang.String text, int current)
text
- string to search next word start index.current
- current character index(current caret position in text).public static int findPrevWord(java.lang.String text, int current)
text
- string to search previous word start index.current
- current character index(current caret position in text).public static java.lang.String cpToStr(int cp)
cp
- codepoint.