我在写我的第一篇Objective-C/Cocoa程序。 (我已经知道Windows世界中的C和C++,即Visual C++)。它看起来像Cocoa可以使用char类型,但更喜欢unichar类型。它也看起来像可可并不太在乎wchar_t。那么我应该使用哪种类型的代码的C部分,例如在结构中?如果答案是unichar,那么const wchar_t* myString = L"this is my
如何将unichar字符附加到NSMutableString? unichar c = 'T';
NSMutableString *s = [NSMutableString stringWithString:@"MyString"];
// want s to become "MyStringT"
https://discussions.apple.com/thread/1679290提
我想将常量UInt16的值设置为十六进制值。 我知道,设定一个斯威夫特Character的方式是 let myValue: Character = "\u{1820}"
所以我试图 let myValue: UInt16 = "\u{1820}"
let myValue: unichar = "\u{1820}"
let myValue: UInt16 = "\u{1820}".utf16