Created
September 22, 2014 15:50
-
-
Save onmyway133/3acfff3bdfbe0fbaca25 to your computer and use it in GitHub Desktop.
NSStringf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://ioscodesnippet.com/2011/08/27/nsstringf-simpler-printf-styled-nsstring/ | |
NSString *NSStringf(NSString *format, ...) { | |
va_list ap; | |
NSString *str; | |
va_start(ap,format); | |
str=[[NSString alloc] initWithFormat:format arguments:ap]; | |
va_end(ap); | |
return [str autorelease]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment