I would like to write a function in Objective-C such as the one below, that takes a variable number of arguments, and passes those arguments on to +stringWithFormat:
+stringWithFormat:
initWithFormat:arguments:
NSString *estr(NSString *format, ...) { va_list args; va_start(args, format); NSString *s = [[[NSString alloc] initWithFormat:format arguments:args] autorelease]; va_end(args); return s; }
they don't seem to have a convenience constructor "stringWith..." version