Crate base_emoji [] [src]

base_emoji

Convert everything to Emojis.

πŸ«πŸ”¦πŸ”₯πŸŽ²πŸ¬πŸ€πŸŸπŸ”‹πŸ¬πŸŽ²πŸ¬πŸ€πŸŽπŸŸπŸ’§πŸ‘‚πŸ”₯πŸšͺπŸ”‹πŸŸπŸ”¦πŸ”‹πŸš—πŸ‘£πŸ”¦πŸŒπŸ‘‚πŸ€πŸ—

Reimplementation of base_emoji (JavaScript).

Example

let input = [0xde, 0xad, 0xbe, 0xef];
let output = "β„οΈπŸΌπŸš“πŸ‘…";

assert_eq!(base_emoji::to_string(&input), output);

Encoding (same as original implementation)

Citing the README:

The emojis used are in emojis.json. There are 843 emojis there, but the converter reads sequences of 8 bits at a time, and so only maps the value to the first 256 of them. To stay consistent with other renderings, make sure you don't change the order of your emojis.json.

License

MIT. See included LICENSE file.

Functions

to_bytes

Encode buffer as a base-emoji buffer

to_custom

Encode buffer as custom-mapped string

to_names

Encode buffer as a string of emoji names

to_string

Encode buffer as a base-emoji string