[][src]Trait skellige::prelude::StringExt

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

Required methods

pub fn size(&self) -> usize[src]

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 StringExt for String[src]

impl StringExt for str[src]

Loading content...

Implementors

Loading content...