Closed AbdelrahmanShehab closed 9 months ago
You can import PhoneNumberKit
and parse the number; then you can do any manipulation you need to like:
@State var number: String = "+201203526716"
var nationalNumber: String {
(try? PhoneNumberKit().parse(number).adjustedNationalNumber()) ?? ""
}
Of course, you should handle the throwing
and use @State
or any other needs 🙌🏻
how can I take the whole number, i.e: "+201203526716" without no spacing like this "12 03526716"