words method

List<String?> words([
  1. RegExp? pattern
])

Implementation

List<String?> words([RegExp? pattern]) {
  if (pattern == null) {
    var list = <String?>[];
    reUnicodeWord.allMatches(this).forEach((match) {
      list.add(match[0]);
    });
    return list;
  }
  return pattern.allMatches(this).map((match) => '${match[0]}').toList();
}