search

Home  >  Q&A  >  body text

objective-c - iOS Nsdata (hexadecimal stored in it) converted to decimal

NSdata header stores the length of the image, ru: <00000000 000768f3 >, this is a hexadecimal number, how to convert it to decimal

PHP中文网PHP中文网2803 days ago690

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-02 09:33:46

    uint64_t length = 0;
    [data getBytes:&length length:8];
    length = CFSwapInt64HostToBig(length);

    reply
    0
  • Cancelreply