I have AttributedString with emoji like this "🤣🤣🤣 @Mervin tester 🤣🤣🤣"
Now I need to find a range of Mervin in this attributed String.
let attributedString = NSMutableAttributedString(string: "🤣🤣🤣 @Mervin tester 🤣🤣🤣")
let range = // range for "Mervin" in above String.
Thank you.
Mervin
? Or you are looking for@SomeName
? Else,let range = attributedString.string.rangeOfString("Marvin")
(in pseudo code, I'm not sure of the Swift methods names, but completion should help you). – Jessejessee