How to concatenate two strings on iPhone?

后端 未结 6 1169
既然无缘
既然无缘 2021-02-02 17:27

How to connect string \"Hello\" and string \"World\" to \"HelloWorld\"? Looks like \"+\" doesn\'t work.

6条回答
  •  生来不讨喜
    2021-02-02 18:08

    Bill, I like yout simple solution and I'd like to note that you can also eliminate the space between the two NSStrings:

    NSString * myString = @"Hello"@"World";
    

提交回复
热议问题