Skip to content
/ emojis Public

An Ada 2012 library to replace names between colons with emojis

License

Notifications You must be signed in to change notification settings

onox/emojis

Repository files navigation

Build status Alire License GitHub release IRC Gitter chat

emojis

An Ada 2012 library to replace names between colons with emojis. Supports Emoji version 13.1.

Usage

Ada.Text_IO.Put_Line (Emojis.Replace ("Ada is :heart_eyes: <3"));

This will print to the terminal:

Ada is 😍 🧡

Some of the text emojis like :o and :p are a prefix of certain labels. Use the Completions parameter to avoid the last one being replaced if the text is used in some input field (when the user is pressing the Tab key to cycle through all the labels):

Ada.Text_IO.Put_Line
  (Emojis.Replace ("XD :o :p", Completions => Emojis.Lower_Case_Text_Emojis));

Prints:

😆 😮 :p

The function Labels returns a list of all the labels.

The default value for the parameter Mappings is Emojis.Text_Emojis and contains the following:

Text Emoji
:) 🙂
;) 😉
:D 😀
:'D 😅
:') 😅
:") 😂
XD 😆
X'D 🤣
:o 😮
:O 😮
>:( 😠
:( 🙁
-_- 😒
:'( 😢
:"( 😭
:p 😛
:P 😛
;p 😜
;P 😜
B) 😎
:+) 🤡
:(= 🥵
o_O 🤨
O_o 🤨
XO= 🤮
<3 🧡

Dependencies

In order to build the library, you need to have:

  • An Ada 2012 compiler

  • Alire

Using the library

Use the library in your crates as follows:

$ alr with emojis

Contributing

Read the contributing guidelines if you want to add a bugfix or an improvement.

License

The Ada code and unit tests are licensed under the Apache License 2.0. The first line of each Ada file should contain an SPDX license identifier tag that refers to this license:

SPDX-License-Identifier: Apache-2.0

Names and Unicode codepoints in package Emojis are from emoji-data project.

About

An Ada 2012 library to replace names between colons with emojis

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published