[][src]Function voca_rs::count::count_graphemes

pub fn count_graphemes(subject: &str) -> usize

Counts the graphemes in subject taking care of surrogate pairs and combining marks.

Arguments

Example

use voca_rs::*;
count::count_graphemes("cafe\u{0301}"); // or "café"
// => 4
count::count_graphemes("b\u{0142}\u{0105}d"); // or "błąd"
// => 4
count::count_graphemes("a̐éö̲");
// => 3
count::count_graphemes("rain");
// => 4
use voca_rs::Voca;
"cafe\u{0301}"._count_graphemes(); // or "café"
// => 4