Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何以十进制形式打印带有 1 个字母的字符串? 我需要获取一个字符的唯一整数并将其转换为字符串。
NSString* letter = @"a"; // ---> to @"97"
unichar c = [letter characterAtIndex:0]; NSString *charAsNum = [NSString stringWithFormat:@"%d",c];