Name
NSMutableString — Mac OS X 10.0
Synopsis
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; |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access