• 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
CharacterSet: CharSet("A") - CharSetUnicode = remainder ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CharacterSet: CharSet("A") - CharSetUnicode = remainder ?


  • Subject: CharacterSet: CharSet("A") - CharSetUnicode = remainder ?
  • From: Filip van der Meeren <email@hidden>
  • Date: Sat, 24 Apr 2010 12:50:03 +0200

I want to get the difference between 2 characterSets. For example:

I have the following 2 characterSets...
NSCharacterSet *aSet = [NSCharacterSet characterSetWithCharactersInString:@"a"];
NSCharacterSet *lowerSet = [NSCharacterSet lowercaseLetterCharacterSet];

The difference between these (aSet - lowerSet = remainder):
NSMutableCharacterSet *remainder = [[NSMutableCharacterSet alloc] init];
[remainder formIntersectionWithCharacterSet:aSet];
[remainder formIntersectionWithCharacterSet:[lowerSet invertedSet]];

This works, but when you turn these 2 around, I have a set that doesn't match a thing.
How do I get the same result when I switch aSet and lowerSet in the remainder interesection methods?

Thanks,

Filip


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CharacterSet: CharSet("A") - CharSetUnicode = remainder ?
      • From: Charles Srstka <email@hidden>
  • Prev by Date: Re: Localizing of print dialogs
  • Next by Date: Re: showing a list of mounted volumes with icon
  • Previous by thread: Re: Localizing of print dialogs
  • Next by thread: Re: CharacterSet: CharSet("A") - CharSetUnicode = remainder ?
  • Index(es):
    • Date
    • Thread