Function emojis::search[][src]

pub fn search(query: &str) -> impl Iterator<Item = &'static Emoji>

Search all emojis.

This function returns an iterator over emojis matching the given search query. The query is matched against the emoji CLDR short names and gemoji shortcodes and the returned iterator is sorted with best scores first.

Examples

let mut iter = emojis::search("star");
assert_eq!(iter.next().unwrap(), "⭐");
assert_eq!(iter.next().unwrap(), "🌟");
assert_eq!(iter.next().unwrap(), "🌠");