tokenizeString function

List<String> tokenizeString(
  1. String? input, {
  2. bool splitAll = false,
  3. Tokenizer? tokenizer,
})

Implementation

List<String> tokenizeString(String? input,
    {bool splitAll = false, Tokenizer? tokenizer}) {
  if (input == null) return [];
  tokenizer ??= (splitAll == true) ? aggresiveTokenizer : spaceTokenizer;
  return tokenizer
      .tokenize(input)
      .map((t) => t.toString())
      .toList()
      .whereNotBlank();
}