String mutability in Swift

We can allow a string to be modified (mutated) or not by assigning it to constant(let) (doesn’t allow modification) or variable (var)(allows modification) in Swift. In case of objective-c and cocoa, we have to assign the string to separate classes such NSmutableString, NSString.


Leave a Reply

%d bloggers like this: