add method

Map<String, int> add(
  1. String str, {
  2. bool filterNonChars = true,
})

Add another string to be processed, returns the counts collection. filterNonChars removes non-chars from count.

Implementation

Map<String, int> add(String str, {bool filterNonChars = true}) {
  allCharFrequency(str, filterNonChars: filterNonChars).forEach((key, val) {
    _counts.update(key, (val1) => val1 + val, ifAbsent: () => val);
  });
  return _counts;
}