//拼接字符串
NSString *str11 = @"123";
NSString *str12 = @"456";
//方法:
NSString *appStr1 = [[NSString alloc]initWithFormat:@"%@%@",str11,str12];
NSString *appStr2 = [str11 stringByAppendingFormat:@"%@",str12];
NSString *appStr3 = [str11 stringByAppendingString:str12];
NSLog(@"appStr1 = %@",appStr1);
NSLog(@"appStr2 = %@",appStr2);
NSLog(@"appStr3 = %@",appStr3);
|
|