/// 隐藏中间文字
/// @param text 未隐藏的文本
/// @param first 头不隐藏数
/// @param last 尾不隐藏数
- (NSString *)setNotSeeText:(NSString *)text first:(NSInteger )first last:(NSInteger)last {
NSString *newText = @"";
for (int i = 0; i < text.length; i ++) {
NSString *itemString = [text substringWithRange:NSMakeRange(i, 1)];
if (i < first) {
newText = [newText stringByAppendingString:itemString];
}else if (i >= text.length - last) {
newText = [newText stringByAppendingString:itemString];
}else {
newText = [newText stringByAppendingString:@"*"];
}
}
return newText;
}