代码:
NSString *tempStr = self.consumerNumber.text;
if ([tempStr hasPrefix:@"0"] && [tempStr length] > 1) {
tempStr = [tempStr substringFromIndex:1];
[self.consumerNumbers addObject:tempStr];>
}
输出:001600240321
期望输出:1600240321
谢谢!