2010-07-11 33 views
0

我需要定義一個字符串,它將包含一個可以更改的字符串(我已經可以更改字符串)和其他文本。NSString中的iphone變量

例如,

NSString *commentsAddress = *somestring*/#comments; 

現在我知道這是前人的精力沿

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

行更多的東西,但我不能得到這個工作。

回答

0
NSString *comment = @"This is the comment"; 
NSString *commentAddress = [NSString stringWithFormat: @"%@/#comments", comment]; 
+0

完美無缺。謝謝。 – 2010-07-11 03:56:49