• 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 really Unicode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString really Unicode?


  • Subject: Re: NSString really Unicode?
  • From: Ondra Cada <email@hidden>
  • Date: Sat, 13 Mar 2004 18:16:33 +0100

Jim,

On Saturday, Mar 13, 2004, at 15:22 Europe/Prague, James J. Merkel wrote:

One more thing -- if you have a Unicode string aString, the following will work:

[aString isEqualToString:@"Jim"]; -- even when aString uses, for example, 16-bit characters while @"Jim" uses 7-bit ASCII characters.

Sure. The trick is, there is no "Unicode string" or "7-bit ASCII string". All NSStrings are equal -- in principle, they are all Unicode strings, regardless how they happened to be created (the actual storage needs not be Unicode, but that's encapsulated and thus unimportant).

Welcome in the charm of a proper object-oriented API ;)
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Re: NSString really Unicode? (From: "James J. Merkel" <email@hidden>)

  • Prev by Date: Re: obj-c functions versus class methods
  • Next by Date: Re: Search & replace in nib files?
  • Previous by thread: Re: NSString really Unicode?
  • Next by thread: Re: NSString really Unicode?
  • Index(es):
    • Date
    • Thread