rust calculate length of string code example Example: get length of string rust my_string.chars().count()