Reputation: 879
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?
Upvotes: 0
Views: 141
Reputation: 523304
NSMutableString inherits from NSString, that means -setString:
also works with a mutable string argument.
[mutableStringA setString:mutableStringB];
Upvotes: 2