-(const char *)stringWithFormat:(NSString *)format, ...
{
va_list args;
va_start(args, format);
NSString *lString = [[NSString alloc] initWithFormat:format arguments:args];
[lString autorelease];
va_end(args);
return [lString cStringUsingEncoding:NSUTF8StringEncoding];
}
How to customize a method like 'stringWithFormat'?
-
16-03-2022 - |
Question
I want to customize a method with formated string input and (const char *) return,but the problem is like below... Can anyone tell me how to resolve it? Thanks.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow