• 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
Creating methods with variable length arguments terminated by nil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating methods with variable length arguments terminated by nil


  • Subject: Creating methods with variable length arguments terminated by nil
  • From: Graham Cox <email@hidden>
  • Date: Thu, 16 Jul 2009 15:36:50 +1000

Hi all,

I want to add the following category method to NSString:

- (BOOL) isEqualToAnyStringIn:(NSString*) firstString, ... NS_REQUIRES_NIL_TERMINATION;

I've used some of Cocoa's headers for examples of how to declare this, as above, but I'm not sure how the actual implementation should go. I want to use the method like this:

match = [str isEqualToAnyStringIn:@"CAT", @"DOG", @"BIRD", nil];

--Graham


_______________________________________________

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: Creating methods with variable length arguments terminated by nil
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: Japanese Language
  • Next by Date: Re: Creating methods with variable length arguments terminated by nil
  • Previous by thread: Re: [iPhone] Encrypting data of an iPhone Application / Converting J2ME App functionality
  • Next by thread: Re: Creating methods with variable length arguments terminated by nil
  • Index(es):
    • Date
    • Thread