Abstraction of the Auto suggest API handle all the data.
protected var keywordsList:Array
public var result:String
This property can be used as the source for data binding.
protected var sortedKeywordsList:Array
public function convertXMLToArray(xml:XML):Array
Converts an xml list into an array.
Parameters
| xml:XML — XML which will be converted into an array.
|
Returns
| Array — An array with the list of words converted from XML.
|
See also
public function getKeywordsList():Array
Method to get the list of keyword after the list was sorted.
Returns
| Array — An array with the list of words.
|
See also
protected function removePunctuationAndSplitWords(text:String):Array
Remove punctuations and split words.
Parameters
| text:String — keyword that need to check for punctuation.
|
Returns
| Array — Return the list of words after it removes all the punctuations.
|
protected function searchForTextInList(list:Array, text:String):Array
Search a list of words for a specific text.
Parameters
| list:Array — Lists of words.
|
| |
| text:String — Text to search for.
|
Returns
| Array — An array of the list of words that the method found.
|
public function setKeywordsList(xml:XML):void
Method to feed the list of keywords.
Parameters
| xml:XML — The XML which will be used as original list to sort from.
|
See also
public function sortList(text:String):Array
method to sort the list of keywords for specific letter/s or word/s.
Parameters
| text:String — the text string that will be used to sort the list.
|
Returns
| Array — An array with the sorted list of words.
|
See also
protected function stringContainsSubstringCheck(keyword:String, text:String):Boolean
Method to check for a letter/s whithin any part of the keyword.
Parameters
| keyword:String — The keyword that need to be searched.
|
| |
| text:String — The text that need to be searched for.
|
Returns
| Boolean — A value of true means the text was found in the keyword.
false means that the text was not found in the keyword.
|
protected function substringBeginsWithString(keyword:String, text:String):Boolean
Method to check for a letter/s whithin the beginning of the keyword.
Parameters
| keyword:String — The keyword that need to be searched.
|
| |
| text:String — The text that need to be searched for.
|
Returns