stringSubtractAll function
Subtract all characters that are in charsToDelete
Implementation
String stringSubtractAll(String original, String charsToDelete) {
if (original.isEmpty) {
return '';
}
if (charsToDelete.isEmpty) {
return original;
}
List<int> originalCodes = original.codeUnits;
List<int> deleteCodes = charsToDelete.codeUnits;
return String.fromCharCodes(
listSubtractAll(originalCodes, deleteCodes),
);
}