Packagefeathers.utils.text
Classpublic class TextInputNavigation
InheritanceTextInputNavigation Inheritance Object

Product Version : Feathers 2.0.0

Functions for navigating text inputs with the keyboard.



Public Methods
 MethodDefined By
  
findCurrentWordEndIndex(text:String, selectionEndIndex:int):int
[static] Finds the end index of the word that starts with the current selection.
TextInputNavigation
  
findCurrentWordStartIndex(text:String, selectionStartIndex:int):int
[static] Finds the start index of the word that starts with the current selection.
TextInputNavigation
  
findNextWordStartIndex(text:String, selectionEndIndex:int):int
[static] Finds the start index of the next word that starts after the selection.
TextInputNavigation
  
findPreviousWordStartIndex(text:String, selectionStartIndex:int):int
[static] Finds the start index of the word that starts before the selection.
TextInputNavigation
Method Detail
findCurrentWordEndIndex()method
public static function findCurrentWordEndIndex(text:String, selectionEndIndex:int):int

Finds the end index of the word that starts with the current selection. If the current selection is in the whitespace between words, returns the end index of the next word.

Parameters

text:String
 
selectionEndIndex:int

Returns
int
findCurrentWordStartIndex()method 
public static function findCurrentWordStartIndex(text:String, selectionStartIndex:int):int

Finds the start index of the word that starts with the current selection. If the current selection is in the whitespace between words, returns the start index of the previous word.

Parameters

text:String
 
selectionStartIndex:int

Returns
int
findNextWordStartIndex()method 
public static function findNextWordStartIndex(text:String, selectionEndIndex:int):int

Finds the start index of the next word that starts after the selection.

Parameters

text:String
 
selectionEndIndex:int

Returns
int
findPreviousWordStartIndex()method 
public static function findPreviousWordStartIndex(text:String, selectionStartIndex:int):int

Finds the start index of the word that starts before the selection.

Parameters

text:String
 
selectionStartIndex:int

Returns
int