Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oleander/emojize
🚗 Swift 3 emoji parser for String, NSAttributedString and NSMutableAttributedString
https://github.com/oleander/emojize
emoji emojize nsattributedstring nsmutableattributedstring parser swift3
Last synced: 24 days ago
JSON representation
🚗 Swift 3 emoji parser for String, NSAttributedString and NSMutableAttributedString
- Host: GitHub
- URL: https://github.com/oleander/emojize
- Owner: oleander
- License: mit
- Created: 2017-02-19T01:09:39.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-23T03:18:26.000Z (over 7 years ago)
- Last Synced: 2024-12-02T03:40:36.817Z (24 days ago)
- Topics: emoji, emojize, nsattributedstring, nsmutableattributedstring, parser, swift3
- Language: Swift
- Homepage:
- Size: 167 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Emojize [![Status](https://travis-ci.org/oleander/Emojize.svg?branch=master)](https://travis-ci.org/oleander/Emojize)
Swift 3 emoji parser for `String`, `NSAttributedString` and `NSMutableAttributedString`. It replaces sub strings on the form `":emoji:"` with its corresponding emoji character. The emoji lookup table is taken from [github/gemoji](https://github.com/github/gemoji).
## Usage
```swift
import Emojizelet string = "This is a :car:"
string.emojified // => "This is a 🚗"
NSMutableAttributedString(string: string).emojified.string // => "This is a 🚗"
NSAttributedString(string: string).emojified.string // => "This is a 🚗"
```## Install
Add `pod 'Emojize'` to your `Podfile` and run `pod install`.