Shortcuts in Objective-C to concatenate NSStrings

前端 未结 30 2607
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 07:03

Are there any shortcuts to (stringByAppendingString:) string concatenation in Objective-C, or shortcuts for working with NSString in general?

30条回答
  •  粉色の甜心
    2020-11-22 07:42

    I tried this code. it's worked for me.

    NSMutableString * myString=[[NSMutableString alloc]init];
    myString=[myString stringByAppendingString:@"first value"];
    myString=[myString stringByAppendingString:@"second string"];
    

提交回复
热议问题