What is the difference between String and NSMutableString?

76 Views Asked by At

What is the difference between String and NSString?

1

There are 1 best solutions below

1
Duncan C On BEST ANSWER

String is a Swift native type, and uses value semantics.

NSMutableString is a Foundation Class object that is "toll-free-bridged" with the Swift String type. As a Class object it uses reference semantics.

The NSMutableString class has a few methods that the Swift String type does not.