标签:style class code ext color com
NSString* string;
// 结果字符串
02 |
NSString* string1, string2; //已存在的字符串,需要将string1和string2连接起来 |
03 |
04 |
//方法1. |
05 |
string = [NSString initWithFormat:@ "%@,%@" , string1, string2 ]; |
06 |
07 |
//方法2. |
08 |
string = [string1
stringByAppendingString:string2]; |
09 |
10 |
//方法3 . |
11 |
string = [string stringByAppendingFormat:@ "%@,%@" ,string1, string2]; |
标签:style class code ext color com
原文地址:http://www.cnblogs.com/ejllen/p/3784276.html