macos iOS 数字转文字
2019-09-27 本文已影响0人
雨后天_
NSNumberFormatter *formatter = [[NSNumberFormatter alloc]init];
formatter.numberStyle = NSNumberFormatterSpellOutStyle;
NSString*str = [formatterstringFromNumber:@(53246)];
NSLog(@"%@",str);//输出:五万三千二百四十六
NSNumberFormatter *formatter = [[NSNumberFormatter alloc]init];
formatter.numberStyle = NSNumberFormatterSpellOutStyle;
NSString*str = [formatterstringFromNumber:@(53246)];
NSLog(@"%@",str);//输出:五万三千二百四十六