In Objective-c …
I want represent placeholder char(%)
but my code don’t….
NSString *base = @"<style type=\"test/css\">div{width:100\%}</style><body>%@</body>";
NSString *html = [NSString stringWithFormat:base, @"hello world"];
NSLog(@"%@",html);
- expect : div{width:100%}
- real : div{width:100}
what is wrong?
Try this:
The full list of format specifiers is here.