4
我用这个代码把绳剪断componentsSeparatedByString返回错误的结果
NSString *titleString = @"22.225453615805794,113.554006577014889";
NSArray *array = [titleString componentsSeparatedByString:@","];
NSLog(@"title string %@", titleString);
NSLog(@"first %.15f", [[array objectAtIndex:0] floatValue]);
NSLog(@"second %.15f", [[array objectAtIndex:1] floatValue]);
但为什么它返回
22.225454330444336 和 113.554008483886719
是的,你是对的,非常感谢 – 2012-03-15 08:38:17