- Inherits from:
- NSString : NSObject
- Conforms to:
- NSCoding
- (NSString)
- NSCopying (NSString)
- NSMutableCopying (NSString)
- NSObject (NSObject)
Declared in:
- Foundation/NSString.h
The NSMutableString class declares the programmatic interface to an object that manages a mutable string-that is, a string whose contents can be edited. To construct and manage an immutable string-or a string that cannot be changed after it has been created-use an object of the NSString class.
An immutable string is implemented as array of Unicode characters (in other words, as a text string). The NSMutableString class adds one primitive method- replaceCharactersInRange:withString:-to the basic string-handling behavior inherited from NSString. All other methods that modify a string work through this method. For example, insertString:atIndex: simply replaces the characters in a range of zero length, while deleteCharactersInRange: replaces the characters in a given range with no characters.
- Creating temporary strings
- + stringWithCapacity:
- Initializing an NSMutableString
- - initWithCapacity:
- Modifying a string
- - appendFormat:
- - appendString:
- - deleteCharactersInRange:
- - insertString:atIndex:
- - replaceCharactersInRange:withString:
- - setString:
+ (id)stringWithCapacity:(unsigned)capacity
- (void)appendFormat:(NSString
*)format,
...
See Also: - appendString:
- (void)appendString:(NSString
*)aString
See Also: - appendFormat:
- (void)deleteCharactersInRange:(NSRange)aRange
- (id)initWithCapacity:(unsigned)capacity
- (void)insertString:(NSString
*)aString
atIndex:(unsigned)loc
- (void)replaceCharactersInRange:(NSRange)aRange
withString:(NSString *)aString
- (void)setString:(NSString
*)aString