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 exact matches and higher scores are returned first.

Examples

let mut iter = emojis::search("star");
assert_eq!(iter.next().unwrap(), "⭐");
assert_eq!(iter.next().unwrap(), "🤩");
assert_eq!(iter.next().unwrap(), "✡️");