Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/terhechte/emojito

Find all Emoji in a string. Supports complex emoji such as ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ.
https://github.com/terhechte/emojito

emoji rust unicode

Last synced: about 1 month ago
JSON representation

Find all Emoji in a string. Supports complex emoji such as ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ.

Awesome Lists containing this project

README

        

[![license](https://shields.io/badge/license-MIT-green)](https://github.com/terhechte/emojito/blob/main/LICENSE.md)
![Rust CI](https://github.com/terhechte/emojito/actions/workflows/ci.yml/badge.svg)
![Documentation](https://docs.rs/emojito/badge.svg)

# Emojito

``` toml
emojito = "0.2.1"
```

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

## Usage

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