简体   繁体   中英

how to set std code as prefix in phone number?

I am new for iOS. In my app I need to add phone number. I adding the phone number in my profile for eg 1234567890 and when I am on display page then it show same 1234567890 but i want it shoe with std code as prefix for eg (for India)+911234567890 .

can any one help me for this. Thanks.

NSString *stdCode = @"+91";
NSString *phoneNumber = @"1234567890";
NSString *resultStr = [NSString stringWithFormat:@"%@%@", stdCode, phoneNumber];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM