WordFrequencyCounter.fromString constructor

WordFrequencyCounter.fromString(
  1. String? str,
  2. String? word
)

Creates a counter and adds parameter string. word is the word to count

Implementation

WordFrequencyCounter.fromString(String? str, String? word) : _word = word {
  add(str!);
}