iOS ASCII NSString转换
2017-07-07 本文已影响2626人
kobehjk
// NSString to ASCII
NSString *string = @"A";
int asciiCode = [string characterAtIndex:0]; //65
//ASCII to NSString
int asciiCode = 65;
NSString *string =[NSString stringWithFormat:@"%c",asciiCode]; //A