简体   繁体   English

如何获得pf前缀电话号码?

[英]How can i get prefix pf phone number?

Hello everyone I am trying to get prefix of phone numbers in order to get the actual phone number without country dialing code. 大家好,我试图获取电话号码的前缀,以便获得不带国家/地区代码的实际电话号码。 How can I achieve this? 我该如何实现?

Please note that the phone numbers can be 请注意,电话号码可以是

123456789 123456789
0099123456789 0099123456789
+9912345678 +9912345678

or any other formats with country code and area code etc.. 或其他包含国家代码和区号等的格式。

如果您尝试过这种方法,那么它将有所帮助,但不确定,

NSString *str=[PhoneNumber substringToIndex:[PhoneNumber length]-10];

Taking a look at the amount of different prefixes you can have List of country calling codes [wikipedia] and Internatioal dialing prefix [wikipedia], one could reach the conclusion that without narrowing the area down you'll probably not get very far with this. 看一下您可以使用的国家/地区电话代码清单 [wikipedia]和国际拨号前缀 [wikipedia]的数量,您可能会得出这样的结论:如果不缩小范围,您可能会对此不太了解。

If however you'll be handling phone numbers from a specific region to another specific region you might be able to come up with something. 但是,如果您要处理从特定区域到另一个特定区域的电话号码,您也许可以提出一些建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何将标准代码设置为电话号码的前缀? - how to set std code as prefix in phone number? 如何在 INSendPaymentIntent 中选择电话号码 - How can I choose phone number in INSendPaymentIntent 如何通过Android中的JavaScript获取设备的电话号码? - How can I get the device's phone number through JavaScript in Android? IOS如何验证输入的电话号码实际上是用户电话号码? - Ios how can I verify that the phone number entered is actually the users phone number? 如何从此JSON响应中获取电话号码? - How do I get phone number from this JSON response? 如何在AddressBook中访问电话号码标签 - how can I access the label of phone number in AddressBook Xcode:如何在朋友的手机上获取我的应用程序? - Xcode: How can I get my application on a friend's phone? 我是世界上唯一无法从UIWebView拨打电话的人吗? - Am I the only person in the world that CAN'T get a phone number to dial from a UIWebView? 如何获取联系人中所选人员的电话号码 - how to get phone number of selected person in contacts 如何更改ABPeoplePickerNavigationController的外观,以便查看电话号码类型(家庭,移动电话等) - How can I change the look of ABPeoplePickerNavigationController so that i can see phone number type (home,mobile etc)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM