For example, say we know that the default area code is 21, and the country code is 62
123456789 -> 6221123456789
021123456789 -> 6221123456789
022123456789 -> 6222123456789
6222123456789 -> 6222123456789
(62)21 123456789 -> 6221123456789
Basically this seems simple. However, I wonder if there is a rule for phone number.
For example, is first 2 digit always country code if the length of phone number is 10?
What sort of formatting that IOS uses anyway?
https://github.com/rmaddy/RMPhoneFormat#rmphoneformat
Some posts somewhere on some questions mention this. This is what I will use.