matrix-org / emojibase-bindings

Packages emojibase bindings for iOS and Android
Apache License 2.0
3 stars 1 forks source link

Add a `isOnlyEmojis()` function #16

Open bmarty opened 1 year ago

bmarty commented 1 year ago

In order to detect when a string contains only Emoji(s), it would be nice if a function isOnlyEmojis(str: String) were provided by the library.

On the plus side, the code will be shared between Android, iOS and Web.

Context: https://github.com/vector-im/element-x-android/issues/1438

Note: on Element Android, we were relying on a third party library to detect such strings.