pub fn char_len(&self) -> usize {
        self.ascii_len
            + self.bytes[self.ascii_len..]
                .iter()
                .filter(|b| is_utf8_leading_byte(**b))
                .count()
    }
/// Gets the total number of code points, if the byte string is valid UTF-8.
///
/// If the byte string is not valid UTF-8, this method counts the number of
/// leading UTF-8 code units.
Gets the total number of code points, if the byte string is valid UTF-8.
If the byte string is not valid UTF-8, this method counts the number of
leading UTF-8 code units.
Gets the total number of code points if the byte string is valid UTF - 8 . If the byte string is not valid UTF - 8 this method counts the number of leading UTF - 8 code units .
pub fn char_len(&self) -> usize {
        self.ascii_len
            + self.bytes[self.ascii_len..]
                .iter()
                .filter(|b| is_utf8_leading_byte(**b))
                .count()
    }
pub fn char_len ( & self ) -> usize { self . ascii_len + self . bytes [ self . ascii_len .. ] . iter ( ) . filter ( | b | is_utf8_leading_byte ( * * b ) ) . count ( ) }
Gets the total number of code points, if the byte string is valid UTF-8.
Gets the total number of code points if the byte string is valid UTF - 8 .
&self
&self