views:

37

answers:

1

I need to define a string that will include a string that changes (i can already make that string change) and additional text.

for example,

NSString *commentsAddress = *somestring*/#comments;

now i know it sould be something more along the lines of

NSString *commentsAddress = @"%@/#comments", *somestring*;

but I can't get this to work.

A: 
NSString *comment = @"This is the comment";
NSString *commentAddress = [NSString stringWithFormat: @"%@/#comments", comment];
kiamlaluno
worked flawlessly. thanks.
Colby Bookout