我正在使用以下方式连接两个字符串
NSString *firstString =@"Added Contnet To My Learning";
NSString *secondString = appDelegate.activity_Description;
appDelegate.activity_Description = [firstString stringByAppendingString:secondString];
我正在使用以下方式连接两个字符串
NSString *firstString =@"Added Contnet To My Learning";
NSString *secondString = appDelegate.activity_Description;
appDelegate.activity_Description = [firstString stringByAppendingString:secondString];
你可以这样做。
NSString *firstString =@"Added Contnet To My Learning";
NSString *secondString = appDelegate.activity_Description;
appDelegate.activity_Description = [NSString stringWithFormat:@"%@ %@", firstString, secondString];
你试过了吗?
NSString *firstString =@"Added Contnet To My Learning ";
// a space after the first string
这是你可以用字符串做的所有方法
//1st Way
NSString *finalString = [NSString stringWithFormat:@"%@ %@",firstString,secondString];
//2nd Way
NSString *finalString = [firstString stringByAppendingFormat:@" %@",secondString];
//3rd way
NSArray *ary= [NSArray arrayWithObjects:firstString,secondString, nil];
NSString *finalString= [ary componentsJoinedByString:@" "];