2020-07-21 23:29:02 +02:00
|
|
|
final kanjiPattern = RegExp(r'[\u3400-\u4DB5\u4E00-\u9FCB\uF900-\uFA6A]');
|
|
|
|
|
|
|
|
List<String> kanjiSuggestions(String string) {
|
2021-07-26 21:39:17 +02:00
|
|
|
return kanjiPattern
|
|
|
|
.allMatches(string)
|
|
|
|
.map((match) => match.group(0))
|
|
|
|
.where((element) => element != null)
|
|
|
|
.map((element) => element!)
|
|
|
|
.toList();
|
|
|
|
}
|