My understanding of printf strings is that you can prefix any conversion specifier with a minimum field width. This does not work for Cocoa s %@ specifier. Example:
NSLog(@"'% 5@ '", @"foo"); NSLog(@"'%5s'", [@"foo" UTF8String]);
Output:
⌠'foo' ⌠' foo'
Is this the intended behavior?
printf cocoa string-formatting
Nikolai Ruhe
source share