• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSString and wchar_t
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: NSString and wchar_t (From: James Gregurich <email@hidden>)

  • Prev by Date: Re: NSString and wchar_t
  • Next by Date: Re: THANK YOU OSX GANG
  • Previous by thread: Re: NSString and wchar_t
  • Next by thread: Re: Ways Apple COULD optimize -setNeedsDisplay
  • Index(es):
    • Date
    • Thread