开发者

Concatenate int and string

How can I concatenate an int (e.g开发者_JAVA百科: 4) and a string (e.g: @"/12") for printing?

I'm okay with casting the int it to an NSString format, but I don't know how I can add @"/12" after the int's value.


I don't get your question, but I think you mean something like this:

...[NSString stringWithFormat:@"%d/12", intValue]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜