// 不但可以通过占位符来对字符串进行连续定义
unichar ch = ‘Y‘;
NSLog(@"%@", [NSString stringWithFormat:@"%c", ch]); //还可以对变量内数据进行Format操作
color = [NSString stringWithFormat:@"Red under is %@,location = %d",@"Orange",2];
NSLog(@"占位符自定义:%@",color);
时间: 2024-10-18 00:27:15