[][src]Trait fungus::core::StringSizeExt

pub trait StringSizeExt {
    fn size(&self) -> usize;
}

Required methods

fn size(&self) -> usize

Returns the length in characters rather than bytes i.e. this is a human understandable value. However it is more costly to perform.

Examples

use fungus::prelude::*;

assert_eq!("foo".size(), 3);
assert_eq!("ƒoo".len(), 4); // fancy f!
assert_eq!("ƒoo".size(), 3); // fancy f!
Loading content...

Implementations on Foreign Types

impl StringSizeExt for str[src]

impl StringSizeExt for String[src]

Loading content...

Implementors

Loading content...