Passing variable argument list on to another function
Passing variable argument list on to another function
- Subject: Passing variable argument list on to another function
- From: Christian Mike <email@hidden>
- Date: Thu, 23 Aug 2001 11:15:03 -0500
As you have seen from previous e-mails, I am fighting a difference between
NSString string formats and printf. I would like to do the following:
[myMutableString myAppendFormat:formatString,argList...];
and write my own function that essentially does:
-(void)myAppendFormat:(NSString *)formatString,...
{
char cString[1024];
va_list argList;
sprintf(cString,[formatString cString],argList);
[self appendString:[NSString stringWithCString:cString]];
}
But this doesn't seem to work quite right. How can I pass the variable
argument list portion of this on to sprintf?
Thanks.
Michael Christian