objective c strings concatenate code example
Example 1: c concatenate strings
char str[80];
strcpy(str, "these ");
strcat(str, "strings ");
strcat(str, "are ");
strcat(str, "concatenated.");
Example 2: objective c strings concatenate
result = [result stringByAppendingString:@"This is "];
Example 3: objective c strings concatenate
- (NSString *)strCat: (NSString *)one: (NSString *)two
{
NSString *myString;
myString = [NSString stringWithFormat:@"%@%@", one , two];
return myString;
}