words property

List<String> words

Returns all the words in the String.

A word is defined as a sequence of word-characters bound by word boundaries either side. By definition all non-word characters are excluded from this definition.

Implementation

List<String> get words {
  final matches = RegExp(_rWords).allMatches(this);
  final retVal = <String>[];
  for (final e in matches) {
    final word = e[0];
    if (word != null) {
      retVal.add(word);
    }
  }
  return retVal;
}