Type Method

stringWithCapacity:

Returns an empty NSMutableString object with initial storage for a given number of characters.

Declaration

+ (NSMutableString *)stringWithCapacity:(NSUInteger)capacity;

Parameters

capacity

The number of characters the string is expected to initially contain.

Return Value

An empty NSMutableString object with initial storage for capacity characters.

Discussion

The number of characters indicated by capacity is simply a hint to increase the efficiency of data storage. The value does not limit the length of the string.

See Also

Creating and Initializing a Mutable String

- initWithCapacity:

Returns an NSMutableString object initialized with initial storage for a given number of characters,

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software