[−][src]Struct tsur::ascii::ascii::ASCII
Implementations
impl ASCII
[src]
pub fn new() -> ASCII
[src]
pub fn count_ascii_characters(self, content: &str) -> HashMap<char, usize>
[src]
Returns hashmap of how many times each character occur in a content.
Arguments
content
- A string slice in which we want to count character occurrences
Examples
Basic usage:
let content = "ABA→"; let mut expected: HashMap<char, usize> = HashMap::new(); expected.insert('A', 2); expected.insert('B', 1); expected.insert('→', 1); let ascii = ASCII::new(); let result = ascii.count_ascii_characters(content); assert_eq!(expected, result);
pub fn get_ascii(self) -> HashMap<char, usize>
[src]
Returns result hashmap character occurrences.
Trait Implementations
impl Debug for ASCII
[src]
impl Eq for ASCII
[src]
impl PartialEq<ASCII> for ASCII
[src]
impl StructuralEq for ASCII
[src]
impl StructuralPartialEq for ASCII
[src]
Auto Trait Implementations
impl RefUnwindSafe for ASCII
impl Send for ASCII
impl Sync for ASCII
impl Unpin for ASCII
impl UnwindSafe for ASCII
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,