onmyway133 / Smile

:smile: Emoji in Swift
https://onmyway133.com/apps/
Other
520 stars 45 forks source link

Fix isEmoji Function #23

Closed justinkumpe closed 3 years ago

justinkumpe commented 3 years ago

This PR updates the isEmoji function to check containsEmoji, containsOnlyEmoji, and isSingleEmoji in one function. This also resolves #22 where isEmoji returned false on several alternate emojis and resolves #15 where isEmoji would return true for an asterisk.

Also updated readme file to account for these changes.

Updated podsec file to version 2.0.2. If this pull request is merged please also push new version to CocoaPods.

onmyway133 commented 3 years ago

@justinkumpe Hi Justin, thanks for the PR 👍 What do you think of introducing some method on Smile, like Smile.isSingleEmoji, Smile.is2DigitsEmoji, Smile.isEmojiOnly, ... instead of extending String? And would be great if there are some tests to ensure the correctness

onmyway133 commented 3 years ago

@justinkumpe looks a lot better now, 👍

justinkumpe commented 3 years ago

@onmyway133 Removed the checkEmojiRule function. Not sure exactly why I decided to leave it in there to begin with.

onmyway133 commented 3 years ago

@justinkumpe This is awesome, thanks 👍 I guess I need to change the indentation from 2 to 4 spaces. I started working in places where 4 spaces is preferred and I get used to that now.