How to concatenate two strings on iPhone?

后端 未结 6 1174
既然无缘
既然无缘 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:07

    How about:

    NSString *hello = @"Hello";
    NSString *world = @"World";
    NSString *helloWorld = [hello stringByAppendingString:world];
    

提交回复
热议问题