如果我具有作为a的字符串值,则应显示为65,如果是b,则应显示ASCII等效的66,因此任何人都请帮忙!!!

最佳答案

NSString *string = @"A";
int asc = [string characterAtIndex:0];

09-25 16:16