NSNumberFormatter *f = [[NSNumberFormatter alloc] init];

[f setNumberStyle:NSNumberFormatterDecimalStyle];

NSNumber * myNumber = [f numberFromString:@”42″];

Advertisements