pub trait HasCharCount {
// Required method
fn char_count(&self) -> usize;
}Expand description
The number of characters property of a type.
Counts the number of contained characters. The character count may be different from the length if any character occupies more than one byte in memory.
This is usually a property of a container of chars like String,
Vec<char> or &[char]
Required Methods§
Sourcefn char_count(&self) -> usize
fn char_count(&self) -> usize
Returns the number of characters.