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.
抱歉这个业余问题,我想在 unicode 字符串中进行一些搜索和比较。
unicode-16我对/有点困惑wchar_t,在 Windows 操作系统中,它的存储方式是否与数组的存储方式相同uint16?
unicode-16
wchar_t
uint16
我的意思是如果我可以这样使用它而没有任何麻烦?
wchar_t a[100]; somefunction((uint16 *)a); //treat a as an array of uint16 data and do something with it.
是的,它是一个 的数组wchar_t,它是一个uint16_t. wchar_t它也(通常)以 NUL 结尾,这意味着字符串末尾有一个零值。
uint16_t