SubStringFrequencyCounter.fromString constructor

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

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

Implementation

SubStringFrequencyCounter.fromString(String? str, String? word) : _substring = word {
  add(str);
}