I get a list of contact numbers from the address book of the mobile (both iOS and Android). But they are all not uniform.Sometime I get phone number with countrycode like (+919912345678) or I get numbers with preceding zero like 09912345678 or I get numbers with no country code and preceding zeros like 9912345678
Can anyone please suggest how to knock of the country code and the preceding zero's and get only the national number say in this case 9912345678.
I am currently doing string replace '+' with blank and replace the numbers starting with 0 to nothing.
I believe there should be a better way to do this.
I am looking at all country codes and not +91 alone.
The input to the function should be a contact number in any format and I am looking for the national number of the format.
(The scope is only mobile number)
Thanks for your time and effort in helping me.