Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将 (581)-111-1234 之类的电话号码或任何电话格式转换为简单的纯数字格式,例如:android 中的 5811111234?
任何的想法?
使用 PhoneNumberUtils
PhoneNumberUtils.stripSeparators(phoneNumber); PhoneNumberUtils.toaFromString(phoneNumber);
PhoneNumberUtils.stripSeparators("(581)-111-1234");