iOS 电话号码344格式化
![](https://img.haomeiwen.com/i2116995/94cfce71ae684f3a.png)
//电话号码344格式
NSString *tenDigitNumber = @"19900000000";
tenDigitNumber = [tenDigitNumber stringByReplacingOccurrencesOfString:@"(\\d{3})(\\d{4})(\\d{4})"
withString:@"$1 $2 $3"
options:NSRegularExpressionSearch
range:NSMakeRange(0, [tenDigitNumber length])];
NSLog(@"%@", tenDigitNumber);
self.phoneNumber.text =[NSString stringWithFormat:@"验证码已发送至+86 %@",tenDigitNumber];
本文标题:iOS 电话号码344格式化
本文链接:https://www.haomeiwen.com/subject/wulcyltx.html
网友评论