How to split mobile number into country code, area code and local number?

前端 未结 7 569
悲&欢浪女
悲&欢浪女 2020-12-03 10:33

How to split mobile number into country code, area code and local number? e.g +919567123456 after split

country code = 91

area code = 9567

local numb

相关标签:
7条回答
  • 2020-12-03 11:22

    Don't maintain your own table of all this data! Use the "Java International Phone Number Utilities library v3.0", https://github.com/googlei18n/libphonenumber. This is what Google uses, and Google maintains it for you!

    0 讨论(0)
提交回复
热议问题