RAC宏分析5:metamacro_concat
2017-07-05 本文已影响26人
大刘
metamacro_concat
这个宏也很简单,连接而已:
/**
* Returns A and B concatenated after full macro expansion.
*/
#define metamacro_concat(A, B) \
metamacro_concat_(A, B)
#define metamacro_concat_(A, B) A ## B
释义:拼接A和B,即AB
示例:
NSString *str = @"Hello china!";
NSLog(@"%@", metamacro_concat_(st, r)); // Hello china!