小编Asi*_*Net的帖子

如何将印度数转换为阿拉伯数?

我正试图从我的应用程序拨打电话,但似乎我不能,因为数字是印度格式(例如:966595848882)并使其工作,我必须将此字符串转换为阿拉伯语格式(例如:966595848882)

我的代码:

NSString *cleanedString = [[ContactInfo componentsSeparatedByCharactersInSet:[[NSCharacterSet characterSetWithCharactersInString:@"0123456789-+()"] invertedSet]] componentsJoinedByString:@""];

NSString *phoneNumber = [@"telprompt://" stringByAppendingString:cleanedString];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];
Run Code Online (Sandbox Code Playgroud)

objective-c ios xcode5

2
推荐指数
1
解决办法
2065
查看次数

标签 统计

ios ×1

objective-c ×1

xcode5 ×1