Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guanting112/remove_emoji
Remove Emoji for Ruby 2 ~ 3.x / Rails ๐๐ฒ
https://github.com/guanting112/remove_emoji
emoji ruby ruby-on-rails
Last synced: 7 days ago
JSON representation
Remove Emoji for Ruby 2 ~ 3.x / Rails ๐๐ฒ
- Host: GitHub
- URL: https://github.com/guanting112/remove_emoji
- Owner: guanting112
- License: mit
- Created: 2017-12-14T17:59:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-01-01T18:32:00.000Z (about 4 years ago)
- Last Synced: 2024-12-26T06:07:42.923Z (14 days ago)
- Topics: emoji, ruby, ruby-on-rails
- Language: Ruby
- Homepage: https://rubygems.org/gems/remove_emoji
- Size: 67.4 KB
- Stars: 55
- Watchers: 1
- Forks: 13
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Remove Emoji ( 2021 )
=================================================[![Gem Version](https://badge.fury.io/rb/remove_emoji.svg)](https://badge.fury.io/rb/remove_emoji)
[![Build Status](https://travis-ci.org/guanting112/remove_emoji.svg?branch=master)](https://travis-ci.org/guanting112/remove_emoji)
[![Code Climate](https://codeclimate.com/github/guanting112/remove_emoji/badges/gpa.svg)](https://codeclimate.com/github/guanting112/remove_emoji)ๆญค็บ้ๅฐใ็งป้คใUnicode Emoji ๅ็คบ ๆ้็ผ็ๅฐๅฑฌๅฅไปถ๏ผ
ๆจๅฏไปฅ้้่ฉฒๅฅไปถ็งป้คไปคไบบๅฐๆพ็ Emoji ็ฌฆ่ใ
( It can remove any of the emoji supported by that package. )![emoji](https://i.imgur.com/h1Ip0r6.png)
Installation / ๅฎ่ฃๆนๅผ
--------via Rubygems
```shell
gem install remove_emoji
```In your Gemfile:
```ruby
gem 'remove_emoji', '~> 3.0.0'
```Usage / ไฝฟ็จๆนๅผ
--------ไฝฟ็จๆนๅผๅพ็ฐกๅฎ๏ผๅ ้่ฆๅผๅซ RemoveEmoji::Sanitize.call ้ๅ ฅไฝ ่ฆ้ๆฟพ็ๅญไธฒๅณๅฏ้ๆฟพใ
```ruby
require 'remove_emoji'original_string = "๐๐๐๐ค๐ฟ๐น๐ง๐ง๐ป๐ง๐ผ๐ง๐ฝ๐ค๐ผ๐๐ฝ๐โ๐ผ๐ฅ๐ฅฆ๐ถ๐ฝ๐"
puts RemoveEmoji::Sanitize.call(original_string)
``````ruby
require 'remove_emoji'# ==========
# Input
# ==========
original_string = <<-STRING
abcdefghijklmnopqrstuvwxyz....0123456789
ไธๆฅต๏ผ็ฉ็้กๆธ่ป่ฃก๏ผๅไปๆๅๆฅๅๅ ้
ใใใใณใใใใใณใไธกๆนไฝฟ็จใใใไธญ
๐๐๐จ๐ฒ๐ก๐ ๐ถ๐บ๐๐ฆ๐๐ฆ๐ฑโ๏ธ๐ฒ๐ฏ๐ฎ๐๐๐๐ฆ
๐โฎ๏ธ๐๐ฏโช๏ธใ๏ธ๐ต๐๐ฏโ๐๐ท๐ฐโ๏ธโ ๏ธ๐ค๐๐โถ๏ธ๐ ๐ฃโ๏ธโฉ๏ธ๐โ๐จ
โฝ๏ธ๐ฒ๐ต๐ฆ๐ณ๏ธ๐ณ๏ธโ๐๐น๐ฒ๐น๐ท๐ค๐ค๐ผ๐๐ฝ๐โ๐ผ๐ฅ๐ฅฆ๐ถ๐ฝ๐
๐ฒ๐๐ฅ๐๐๐๐ฎ๐ฏ๐ฅ ๐ฅข๐ด๐ฅ๐ฅโ๏ธ๐๐๐๐คฃ๐๐ ๐โบ๏ธ๐๐๐
๐๐๐๐๐๐๐๐๐คจ๐ง๐ค๐๐๐คฉ๐คฉ๐๐๐๐๐ข๐ฃโน๏ธ๐ฉ๐๐คฏ
๐ฐ๐๐ฆ๐ฒ๐ค๐ค๐ฟ๐น๐ฝโ๐ผ
ใซใฏๆ์ค๊ตญ, ์ผ๋ณธ, ๋ฒ ํธ๋จ ๋ฑ ํ์ ๋ฌธํ๊ถ์ ์ํ๋ ์์์ ์ฌ๋ฌ ๊ตญ๊ฐ์์๋
ํ๊ตญ์ด็ๅทฎๅผๅค๏ผ้ๅธธ่ฎคไธบ่ฟๅญๅจ่ฏๆฑไธ็ๅทฎๅผใไพๅฆ็นไฝไธญๆ้ๅค็จ็โๅ
ูู ูุทูุฉ ุงูุดุฑู ุงูุฃูุณุท ูููู: ุงูุชุญุฑู ุถุฏ ุฅูุฑุงู ุณูุจุฏุฃ ู ู ู ุฌูุณ ุงูุฃู ู
STRING# ==========
# Output
# ==========
puts RemoveEmoji::Sanitize.call(original_string)# Result:
# abcdefghijklmnopqrstuvwxyz....0123456789
# ไธๆฅต๏ผ็ฉ็้กๆธ่ป่ฃก๏ผๅไปๆๅๆฅๅๅ ้
# ใใใใณใใใใใณใไธกๆนไฝฟ็จใใใไธญ
#
#
#
#
#
#
# ใซใฏๆ์ค๊ตญ, ์ผ๋ณธ, ๋ฒ ํธ๋จ ๋ฑ ํ์ ๋ฌธํ๊ถ์ ์ํ๋ ์์์ ์ฌ๋ฌ ๊ตญ๊ฐ์์๋
# ํ๊ตญ์ด็ๅทฎๅผๅค๏ผ้ๅธธ่ฎคไธบ่ฟๅญๅจ่ฏๆฑไธ็ๅทฎๅผใไพๅฆ็นไฝไธญๆ้ๅค็จ็โๅ
# ูู ูุทูุฉ ุงูุดุฑู ุงูุฃูุณุท ูููู: ุงูุชุญุฑู ุถุฏ ุฅูุฑุงู ุณูุจุฏุฃ ู ู ู ุฌูุณ ุงูุฃู ู```
Demo ( Before / After )
------![emoji_effect](https://i.imgur.com/OzcQYWL.jpg)
LICENSE
--------ๆฌๅฐๆกๅๅง็ขผๆก MIT LICENSE ๆๆฌ ( ่ฉณ่ฆ LICENSE ๆชๆก )