ryanfilard Posted June 20, 2012 Share Posted June 20, 2012 I am just starting with Objective C and was wondering how to put a string inside a string. I have @"mytext" I want the existing string to go here @"my[OTHERSTRING]text" Link to comment https://forums.phpfreaks.com/topic/264523-objective-c-help/ Share on other sites More sharing options...
seventheyejosh Posted June 25, 2012 Share Posted June 25, 2012 #import <Foundation/Foundation.h> int main(int argc, char *argv[]) { @autoreleasepool { NSString *firstString = @"Test"; NSString *stringTwo = [NSString stringWithFormat:@"my %@ text", firstString]; NSLog(@"New String: %@", stringTwo); } } Link to comment https://forums.phpfreaks.com/topic/264523-objective-c-help/#findComment-1356866 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.