Function yarns::len [] [src]

pub fn len(string: &String) -> usize

Returns the length of the utf-8 representation of a string.

let hello = String::from("Hello");
let length = yarns::len(&hello);
//length = 5