Re: NSString and wchar_t
Re: NSString and wchar_t
- Subject: Re: NSString and wchar_t
- From: Greg Titus <email@hidden>
- Date: Tue, 18 Dec 2001 17:19:15 -0800
On Tuesday, December 18, 2001, at 04:54 PM, James Gregurich wrote:
What should I use to get a unicode string (2 bytes)? Guess I could do a
typedef and make a two byte data structure to be a unicode character.
convert it to an NSData and pass that to the NSString.
NSString defines the type "unichar" which is 2 bytes, along with methods
for putting strings of unichars into an NSString and vice versa:
+ stringWithCharacters:length:
- initWithCharactersNoCopy:length:freeWhenDone:
- initWithCharacters:length:
- characterAtIndex:
- getCharacters:
- getCharacters:range:
...and so on...
Hope this helps,
--Greg