whitelist method

String whitelist(
  1. String chars
)

Removes characters that do not appear in the whitelist.

Implementation

String whitelist(String chars) => replaceAll(RegExp('[^$chars]+'), '');