开发者

Concatenate int and string

开发者 https://www.devze.com 2023-03-02 23:47 出处:网络
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

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

精彩评论

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

关注公众号