withCString
Returns an OSSymbol created from a C string, or the existing unique instance of the same value.
Declaration
static const OSSymbol * withCString(
const char *cString);Parameters
- cString:
The C string to look up or copy.
Return Value
An instance of OSSymbol representing the same characters as cString; NULL on failure.
Overview
This function returns the unique OSSymbol instance representing the string value of cString. 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.