NSNumberFormatter *frm = [[NSNumberFormatter alloc] init];
[frm setNumberStyle:kCFNumberFormatterSpellOutStyle];
//[frm setCurrencySymbol:@"$"];
//[frm setMaximumFractionDigits:2];
NSString *txttext=[[NSString alloc]initWithString:txt.text];
//NSString *formatted = [frm stringFromNumber:[NSNumber numberWithInt:100000]];
self.formatted = [frm stringFromNumber:[NSNumber numberWithInt:[txttext intValue]] ];
self.finalstr=[NSString stringWithString:self.formatted];
NSLog(@"formatted %@",self.finalstr);
//[txt setText:self.finalstr];
NSLog(@"@@@");
[frm setNumberStyle:kCFNumberFormatterSpellOutStyle];
//[frm setCurrencySymbol:@"$"];
//[frm setMaximumFractionDigits:2];
NSString *txttext=[[NSString alloc]initWithString:txt.text];
//NSString *formatted = [frm stringFromNumber:[NSNumber numberWithInt:100000]];
self.formatted = [frm stringFromNumber:[NSNumber numberWithInt:[txttext intValue]] ];
self.finalstr=[NSString stringWithString:self.formatted];
NSLog(@"formatted %@",self.finalstr);
//[txt setText:self.finalstr];
NSLog(@"@@@");
No comments:
Post a Comment