int main(int argc, const char * argv[]) { char *name2 = "dsdfj今晚几点了"; NSString *name1 = @"avvv"; int age = 12; NSString *name = @"dlsdkfls";
NSString * str = [NSString stringWithFormat:@"%@ %d %s %@",name1, age,name2,name]; NSLog(@"%@", str); }
------------------------------------------------------------------------------
2016-09-27 23:07:24.723 nsstring1[2577:60680] Hello, World! 2016-09-27 23:07:24.732 nsstring1[2577:60680] avvv 12 dlsdkfls
Program ended with exit code: 0
|