NSString *a=nil;
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
[formatter setNumberStyle:NSNumberFormatterDecimalStyle];
a=@"123122..9";
//[self checkNumber:a];
NSLog(@"returned: %@####%@", [formatter numberFromString: a],a);
a=@"123122";
NSLog(@"returned: %@####%@", [formatter numberFromString: a],a);
a=@"012312.2";
NSLog(@"returned: %@####%@", [formatter numberFromString: a],a);
a=@"-12312";
NSLog(@"returned: %@####%@", [formatter numberFromString: a],a);
a=@"1dc";
NSLog(@"returned: %@####%@", [formatter numberFromString: a],a);
a=@"d2.dd";
NSLog(@"returned: %@####%@", [formatter numberFromString: a],a);