italiano40 macrumors 65816 Original poster Oct 7, 2007 1,080 0 NY Jul 23, 2008 #1 ok, i want to add a variable into my string and i do Code: int i=23; NSString *f=@"what is $i"; what am i doing wrong
ok, i want to add a variable into my string and i do Code: int i=23; NSString *f=@"what is $i"; what am i doing wrong
lee1210 macrumors 68040 Jan 10, 2005 3,182 3 Dallas, TX Jul 23, 2008 #2 This isn't perl =). Code: int i=23; NSString *myString = [NSString stringWithFormat:@"what is %d",i]; See: http://developer.apple.com/document...rmatStrings.html#//apple_ref/doc/uid/20000943 -Lee
This isn't perl =). Code: int i=23; NSString *myString = [NSString stringWithFormat:@"what is %d",i]; See: http://developer.apple.com/document...rmatStrings.html#//apple_ref/doc/uid/20000943 -Lee