USO400
  • Home
  • About
  • KH400
  • SuperSherpa
  • ZX-10
  • Todo
  • ALTO WORKS
  • KMX125
Sign in Subscribe

obj

A collection of 1 post
ios

NSDataのバイトコードをNSStringに変換する

NSString *str = @"hogehoge"; NSMutableString *result = [NSMutableString string]; NSData *data = [str dataUsingEncoding:NSUTF8StringEncoding]; NSLog(@"data: %@", data); // data: <686f6765 686f6765> const unsigned char *bytes = [data bytes]; for (int i=0; i<[data length]; i++) { [result appendFormat:@"%X", bytes[i]]; } NSLog(@"result: %@"
2014年12月12日
Page 1 of 1
USO400 © 2025
Powered by Ghost