Emojito: Find all Emoji in a string. Supports complex emoji such as family

Published: 2022-12-30 10:30:30

Find Emoji in strings. Supports complex emoji such as ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ. Uses the unic-emoji-char crate in the background, and does not rely on regexes.

Emojito: Find all Emoji in a string. Supports complex emoji such as family

I've released a small new Rust crate which solves a kind of complex unicode problem: It helps finding Emoji in strings. Supports complex emoji such as ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ. Uses the unic-emoji-char crate in the background, and does not rely on regexes.

For example:

let content = "Test ๐Ÿ˜˜โค๏ธ! ๐Ÿ˜ป๐Ÿ’“ ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ฆ  kk ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ";
let emojis = emojito::find_emoji(content);
assert_eq!(emojis.len(), 6);

It, it correctly finds 6 emoji even though some of them are complex combinations of multiple emojis.