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" Quote Link to comment 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); } } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.