In Objective C, two types of string Objects are there one is mutable and Immutable.
To create an immutable string we use NSString and to create a mutable string we use NSMutableString.
If we are creating a string object using NSString, it is an immutable string object. This means the string cannot subsequently be modified in any way. (although any NSString pointer can be reassigned to a new NSString object.)
NSString *string1 = @"immutable String";
For Mutable strings, we use NSMutableString, which is a subclass of NSString.
To assign a mutable string object:
NSMutableString *string2 = [NSMutableString stringWithString:@"Mutable String"];
or
NSMutableString *string2 = [NSMutableString stringWithString: string1]; // string1 is a NSString(immutable)