LanguageValues and typesStandard typesWeb and network
Emoji
On this page
One emoji: ๐, ๐๐ฝ.
Use it for reactions and labels, when you want exactly one emoji. For text with emoji in it, use Text.
Shape
One value, held as text in one set form, with no parts: โค๏ธ.
Example
Emoji("๐")Emoji(raw) checks the text, and text that isn't one breaks the format rule.
text.parse(raw, as: Emoji) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as โค, ๐ฝ or ๐๐.
Good to know
- It has to be in the full form Unicode lists. A red heart needs its variation selector (
U+2764 U+FE0F), so the bareU+2764is refused. ==tells you whether two are the same.<andlist.sort_bydon't take it.
In JSON
A string, in a request, a response or json.write:
"๐""๐๐ฝ""๐จโ๐ฉโ๐ง"
Details
Text form, storage, how it is shown, and operations
Emoji is in the group Web and network, and has been in Jadpo since 0.1.0.
Text form
text.from writes one standard text form, the same form text.parse reads back: ๐, ๐๐ฝ and ๐จโ๐ฉโ๐ง.
How it is stored
It is stored in one column named for the field, of type text. ๐จโ๐ฉโ๐ง is stored as '๐จโ๐ฉโ๐ง'.
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
๐ |
๐ |
๐๐ฝ |
๐๐ฝ |
๐จโ๐ฉโ๐ง |
๐จโ๐ฉโ๐ง |
๐ฌ๐ง |
๐ฌ๐ง |
โค๏ธ |
โค๏ธ |
Operations
It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-emoji.md.Built from Jadpo main at aee2e8f.