pub fn of(text: &str) -> HashMap<char, f64>
Expand description
Returns a frequency map of the given text. The returned map maps characters to
the percent of the entire string that the character makes up. To get the counts of each character,
use frequency::counts()
. This is also case-insensitive; The case-sensitive version is
frequency::of_cased
.
§Performance
This is O(n)
.
§Returns
A map of characters and the percentage of the string they make up.