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.
我想将字符串转换为字节,并且字符串不超过 2 个字节。
谁能告诉我如何将字符串转换为字节并检查它不超过 2 个字节。
请参考NSString类中的cStringUsingEncoding:方法。