filterString function
Only keep characters that meet criteria
Implementation
String filterString(bool Function(String sub) filterFunction, String original) {
if (original.isEmpty) {
return '';
}
List<String> copy = letters(original, true);
for (String letter in listNub(letters(original, true))) {
if (!filterFunction(letter)) {
copy.removeWhere((element) => element == letter);
}
}
return concatStrings(copy);
}