withString
Returns an OSSymbol created from an OSString, or the existing unique instance of the same value.
Declaration
static const OSSymbol * withString(
const OSString *aString);Parameters
- aString:
The OSString object to look up or copy.
Return Value
An instance of OSSymbol representing the same characters as aString; NULL on failure.
Overview
This function creates or returns the unique OSSymbol instance representing the string value of aString. You can compare it with other OSSymbols using the == operator.
OSSymbols are reference-counted normally. This function either returns a new OSSymbol with a retain count of 1, or increments the retain count of the existing instance.