whitelist function

String whitelist(
  1. String str,
  2. String chars
)

Removes all characters that do not appear in chars from the string.

Example:

whitelist('hello world', 'lo'); // 'llool'

Implementation

String whitelist(String str, String chars) => _whitelist(str, chars);