withString
Creates and initializes an OSString from another OSString.
Declaration
static OSString * withString(
const OSString *aString);Parameters
- aString:
The OSString object whose contents to copy.
Return Value
An instance of OSString representing the same characters as aString, and with a reference count of 1; NULL on failure.
Overview
The new OSString is a distinct instance from aString, and is not merely the original object with the reference count incremented. Changes to one will not be reflected in the other.