Skip to content

Instantly share code, notes, and snippets.

@ento
Created July 22, 2009 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ento/151861 to your computer and use it in GitHub Desktop.
Save ento/151861 to your computer and use it in GitHub Desktop.
How to access a variadic argument in Objective-C
- (void)variadic:(NSString*)strings, ... {
va_list lst;
NSString* each;
va_start(lst, strings);
while (each = va_arg(lst, NSString*)) {
[NSString stringWithString: each];
}
va_end(lst);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment