demoji 0.1.0

demoji 0.1.0

Maintained by wangkaird.



demoji 0.1.0

  • By
  • wangkaird

demoji

Build Status CocoaPods Compatible Carthage Compatible Platform License

demoji is an emoji filtering library written in Swift.

Requirements

  • iOS 8.0+ / macOS 10.9+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 10.2+
  • Swift 5+

Installation

CocoaPods

demoji is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'demoji'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate demoji into your Xcode project using Carthage, specify it in your Cartfile:

github "wangkaird/demoji"

Usage

import demoji

let content = "I'm a string with emojis---😀😁😂🤣😃😄😅"
var emojiless = ""

// 1. Using ENBF method.
if #available(iOS 10.2, *) {
    emojiless = Demoji.demoji(content, method: .EBNF)
    print("EBNF-emojiless: \(emojiless)")
}

// 2. Using BruteForce method(which is default).
emojiless = Demoji.demoji(content)
print("BruteForce-emojiless: \(emojiless)")

// 3. Using FeatureFilter method
emojiless = Demoji.demoji(content, method: .FeatureFilter)

print("FeatureFilter-emojiless: \(emojiless)")

// output:
// EBNF-emojiless: I'm a string with emojis---
// BruteForce-emojiless: I'm a string with emojis---
// FeatureFilter-emojiless: I'm a string with emojis---

Author

wangkaird, [email protected]

Buy me a coffee

buymeacoffee

License

demoji is available under the MIT license. See the LECENSE file for more info.