- (NSString *)formatPhone4n4
{
NSInteger len = self.length;
if (len < 7) {
return self;
}
NSRange range = NSMakeRange(3, len - 7);
NSMutableString *points = [[NSMutableString alloc]init];
for (int i = 0; i < 4; i++) {
[points appendString:@"*"];
}
return [self stringByReplacingCharactersInRange:range withString:points];
}
对字符串(手机号)转换为前3 后3 中4*
最新推荐文章于 2024-06-04 07:29:02 发布