Removes characters that do not appear in the whitelist.
String whitelist(String chars) => replaceAll(RegExp('[^$chars]+'), '');