diff --git a/FinniversKit/Sources/Extensions/Foundation/StringExtensions.swift b/FinniversKit/Sources/Extensions/Foundation/StringExtensions.swift index f31061a0a..0e15f05a6 100644 --- a/FinniversKit/Sources/Extensions/Foundation/StringExtensions.swift +++ b/FinniversKit/Sources/Extensions/Foundation/StringExtensions.swift @@ -33,9 +33,10 @@ 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 { - filter { $0.isASCII } + let filteredScalars = unicodeScalars.filter { !$0.properties.isEmojiPresentation } + return String(filteredScalars) } }