NSString, NSMutableString, nsstring
NSString
NOTE
An immutable string is a text string that is defined when it is created and subsequently cannot be changed. an immutable string is implemented as an array of Unicode characters (in other words, a text string ). to create and manage an immutable string, use the NSString class. to construct and manage a string that can be changed after it has been created, use NSMutableString.
NSString manages the object of the Self-string
Content: Read-only, unchangeable
Note: To Inherit NSString, you must overload the characterAtIndex: and length methods.
Encoding method: unicode. This method availableStringEncodings allows you to view the provided encoding. You can specify the encoding when converting strings of other types.
NString self-character string constants are the same as those in C language. They will be in a constant area during compilation and will not be released until the program is completed.
NSMutableString
It is a subclass of NSString and only one variable region.
Vulnerabilities in programming
When the return type of the function is NSString, the function returns NSMutableString, which is correct, but the variable that accepts the returned value points to NSMutableString. When it is accidentally changed, the variable will also change, copy the file.