简体   繁体   中英

Put a nsmutablestring into a other nsmutablestring

If I have a nsmutablestring, I can set his string with the method setString. But this method only takes NSString, How I can put a nsmutablestring into my nsmutableString. If I do this: mutableStringA = mutableStringB, this will change the pointer of mutableStringA and not his string value, is it true?

NSMutableString继承自NSString,这意味着-setString:也可与可变字符串参数一起使用。

[mutableStringA setString:mutableStringB];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM