Objective-c中使用连接符

#define STRING(x) @#x

NSString*conststr1 =STRING(abc;{a; b = c};abc);

NSString*str =STRING(abc);

NSLog(@"str = %@",str);

NSLog(@"str1 = %@",str1);

输出:

2017-12-07 11:39:04.550770+0800 BeautifyFaceDemo[21439:8865890] str = abc

2017-12-07 11:39:04.550830+0800 BeautifyFaceDemo[21439:8865890] str1 = abc;{a; b = c};abc

你可能感兴趣的:(Objective-c中使用连接符)