Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/guanting112/elixir_remove_emoji

Remove Emoji ๐Ÿ˜ˆ๐Ÿˆฒ๐Ÿ˜ฑโ‰๏ธ ( for Elixir 1.4+ ~ 1.10.x )
https://github.com/guanting112/elixir_remove_emoji

Last synced: about 1 month ago
JSON representation

Remove Emoji ๐Ÿ˜ˆ๐Ÿˆฒ๐Ÿ˜ฑโ‰๏ธ ( for Elixir 1.4+ ~ 1.10.x )

Awesome Lists containing this project

README

        

Remove Emoji
=================================================

[![Build Status](https://travis-ci.org/guanting112/elixir_remove_emoji.svg?branch=master)](https://travis-ci.org/guanting112/elixir_remove_emoji)

It can remove any of the emoji. ๐Ÿ’ป๐Ÿ”ฅ๐Ÿคฏ๐Ÿšซ
ๆ‚จๅฏไปฅ้€้Ž่ฉฒๅฅ—ไปถ็งป้™คไปคไบบๅ›ฐๆ“พ็š„ Emoji ็ฌฆ่™Ÿใ€‚

```elixir

original_string = "๐Ÿ‘ฆ๐Ÿ‘ฆ๐Ÿป๐Ÿ‡ฏ๐Ÿ‡ต๐Ÿ‡ฐ๐Ÿ‡ณ๐Ÿ‡ฐ๐Ÿ‡ท๐Ÿ‘ฆ๐Ÿผ๐Ÿ‘ฆ๐Ÿฝ๐Ÿ‘ฆ๐Ÿพ๐Ÿ˜„๐Ÿ˜…๐Ÿ˜†๐Ÿ˜‡๐Ÿ˜ˆ๐Ÿ˜‰๐Ÿ˜Š"
sanitized_string = original_string |> RemoveEmoji.sanitize()

# true, :ok
IO.puts "" === sanitized_string

```

Installation / ๅฎ‰่ฃๆ–นๅผ
------

่ซ‹ๅœจๆ‚จ็š„ Elixir ๅฐˆๆกˆ่ฃก็š„ mix.exs ๅŠ ๅ…ฅไปฅไธ‹ๆŒ‡ไปค๏ผŒ็„ถๅพŒๅŸท่กŒ mix deps.get ๆ›ดๆ–ฐไพ่ณดๅณๅฏใ€‚

```elixir
def deps do
[
{:remove_emoji, "~> 1.0.0"}
]
end
```

Demo ( Before / After )
------

![emoji_effect](https://i.imgur.com/OzcQYWL.jpg)

LICENSE
--------

MIT LICENSE ( See LICENSE.txt )