mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-22 13:57:29 +01:00
11 lines
305 B
Dart
11 lines
305 B
Dart
final kanjiPattern = RegExp(r'[\u3400-\u4DB5\u4E00-\u9FCB\uF900-\uFA6A]');
|
|
|
|
List<String> kanjiSuggestions(String string) {
|
|
return kanjiPattern
|
|
.allMatches(string)
|
|
.map((match) => match.group(0))
|
|
.where((element) => element != null)
|
|
.map((element) => element!)
|
|
.toList();
|
|
}
|