unichar temp=233;
return [NSString stringWithFormat:@"%c",temp];
//Type of 'temp" changed from unichar to char do not affects the output no matter it's char or unichar
输出:
NSString:0xc388,不是预期的0xE9
长度:1
我们需要将一堆数据作为数据包发送,“233”应作为单字节数据发送。
答案 0 :(得分:0)
使用此功能:
+ (id)stringWithCharacters:(const unichar *)chars length:(NSUInteger)length
因为输入是一个数组,所以从这开始:
unichar temp[] = {233};