I want to do the following where “%d”,9 is done joining “%”,”d” <— there is a reason to break up, to loop, ie: %x %d %g %f where I loop just “x d g f”
lbl.text =[NSString stringWithFormat:@"%@%@", @"%", @"d", 9]; <<--errors
- the desired output is “9” <—–
Thanks
Only the first argument is the format, so you need another
stringWithFormat:to take the generated format string. So something like:Although it seems like an NSScanner or
-[NSNumber stringValue]or something would be better suited to this kind of task.