c language string concatenation 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
- (NSString *)strCat: (NSString *)one: (NSString *)two
{
NSString *myString;
myString = [NSString stringWithFormat:@"%@%@", one , two];
return myString;
}