////// // END PROPERTIES ////////////////////////////////////////////////////////////////////// public TextStatistics(string text) { Text = text; WordCount = TextCounter.CountWords(text); CharacterCount = TextCounter.CountCharacters(text); //InstancesOfThe = TextCounter.CountMatchingWords(text, "the"); AverageWordLength = TextCounter.GetAverageWordLength(text); }
public int InstancesOf(string matching) { return(TextCounter.CountMatchingWords(Text, matching)); }