NSMutableString | Mac OS X 10.0 |
NSString creates immutable strings that cannot be changed after the object has been created. NSMutableString adds methods that allow the contents of NSMutableString objects to be altered after object initialization. This class provides methods for replacing portions of a string with another string, inserting strings within the existing string, appending strings and formats, as well as deleting portions of strings.
NSMutableString is toll-free bridged with the Core Foundation type CFString. As such, NSMutableString objects can be used interchangeably with the CFString pointer type, CFStringRef.
@interface NSMutableString : NSString
|
// Initializers |
- (id)initWithCapacity:(unsigned)capacity; |
// Accessor Methods |
- (void)setString:(NSString *)aString; |
// Class Methods |
+ (id)stringWithCapacity:(unsigned)capacity; |
// Instance Methods |
- (void)appendFormat:(NSString *)format, ...; |
- (void)appendString:(NSString *)aString; |
- (void)deleteCharactersInRange:(NSRange)range; |
- (void)insertString:(NSString *)aString atIndex:(unsigned)loc; |
- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)aString; |
- (unsigned int)replaceOccurrencesOfString:(NSString *)target withString:(NSString *)replacement options:(unsigned)opts range:(NSRange)searchRange; |