Package com.spinyowl.legui.util
Class TextUtil
java.lang.Object
com.spinyowl.legui.util.TextUtil
Text utility.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringcpToStr(int cp) Used to convert character codepoint to string.static intfindNextWord(String text, int current) Used to find next word start index from current character index in provided string.static intfindPrevWord(String text, int current) Used to find previous word start index from current character index in provided string.
-
Method Details
-
findNextWord
Used to find next word start index from current character index in provided string.- Parameters:
text- string to search next word start index.current- current character index(current caret position in text).- Returns:
- character index where starts next word.
-
findPrevWord
Used to find previous word start index from current character index in provided string.- Parameters:
text- string to search previous word start index.current- current character index(current caret position in text).- Returns:
- character index where starts previous word.
-
cpToStr
Used to convert character codepoint to string.- Parameters:
cp- codepoint.- Returns:
- string from codepoint.
-