pub fn hyphenate(word: &str, lang: Lang) -> Syllables<'_>Notable traits for Syllables<'a>impl<'a> Iterator for Syllables<'a>    type Item = &'a str;
Expand description

Segment a word into syllables.

Returns an iterator over the syllables.

This uses the default bounds for the language.

Panics

Panics if the word is more than 38 bytes long and the alloc feature is disabled.

Example

let mut syllables = hyphenate("extensive", Lang::English);
assert_eq!(syllables.next(), Some("ex"));
assert_eq!(syllables.next(), Some("ten"));
assert_eq!(syllables.next(), Some("sive"));
assert_eq!(syllables.next(), None);