search

Home  >  Q&A  >  body text

objective-c - iOS nssting 转long long 类似(1111.11) 数据转换 不丢失精度

@"1111.11"转 longlong 不丢失精度

曾经蜡笔没有小新曾经蜡笔没有小新2825 days ago782

reply all(1)I'll reply

  • PHPz

    PHPz2017-04-28 09:07:25

    NSString *str = @"FFFF00FF";
    NSScanner* scanner = [NSScanner scannerWithString: str];

    unsigned long long longValue;
    [scanner scanHexLongLong: &longValue];
    NSLog(@"LongValue = %lld", longValue);
    สั่มี่ไม่ย่

    reply
    0
  • Cancelreply