Skip to content

Commit

Permalink
better solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Momot committed Nov 12, 2024
1 parent 377f919 commit 1d1edc0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ public extension String {
NSAttributedString(string: self, attributes: attributes)
}

// Extension if we want to ignore emojies for VoiceOver reader
// Ignores emojies symbols accrodingly to https://www.ascii-code.com
func withoutEmoji() -> String {
let filteredScalars = unicodeScalars.filter { $0.value <= 255 }
let filteredScalars = unicodeScalars.filter { !$0.properties.isEmojiPresentation }
return String(filteredScalars)
}
}
Expand Down

0 comments on commit 1d1edc0

Please sign in to comment.