wordsExtract function

Future<List<String>> wordsExtract({
  1. required Rope rope,
})

Implementation

Future<List<String>> wordsExtract({required Rope rope}) async {
  return RegExp(
    r'[\p{L}\p{N}_]+',
    unicode: true,
  ).allMatches(rope.getText()).map((match) => match.group(0)!).toSet().toList();
}