* Provides utility methods for splitting strings on word breaks and determining * whether a character index represents a word boundary, using the generic word * breaking algorithm defined in the Unicode Text Segmentation guidelines * (Unicode Standard * Annex #29). *
* This algorithm provides a reasonable default for many languages. However, it * does not cover language or context specific requirements, and it does not * provide meaningful results at all for languages that don't use spaces between * words, such as Chinese, Japanese, Thai, Lao, Khmer, and others. Server-based * word breaking services usually provide significantly better results with * better performance. *
true
false
'foo bar baz foo'
['foo', 'bar', 'baz']
getWords()
* Returns true if there is a word boundary between the * specified character index and the next character index (or the end of the * string). *
* Note that there are always word breaks at the beginning and end of a * string, so isWordBoundary('', 0) and * isWordBoundary('a', 0) will both return true. *
isWordBoundary('', 0)
isWordBoundary('a', 0)
* Note that there are always word breaks at the beginning and end of a * string, so _isWordBoundary('', 0) and * _isWordBoundary('a', 0) will both return true. *
_isWordBoundary('', 0)
_isWordBoundary('a', 0)
_classify