Skip to main content

graphemes

Function graphemes 

Source
pub fn graphemes(s: &str) -> impl Iterator<Item = &str>
Expand description

Iterate over the extended grapheme clusters in a string.

§Parameters

  • s: UTF-8 string slice to segment.

§Returns

An iterator of &str slices, each covering one extended grapheme cluster from s in order.

§Panics

Never panics.

§Usage notes

The returned slices borrow from s; no cell-width classification is performed here.