I copied mobile number from contact . I got it like \"8008708600\\u{e2}\" . I wish to remove \\u{e2} from string. String is copied with exponent character
I made a function for help:
public func formatContactsPhoneNumber(number: String) -> String { var buffer = "" for (i, char) in number.unicodeScalars.enumerated() { guard CharacterSet.decimalDigits.contains(char) else { continue } buffer.append(number[i]) } return buffer }
It's work well for me.