MCPcopy Create free account
hub / github.com/Tracktion/choc / getString

Function getString

choc/platform/choc_ObjectiveCHelpers.h:144–144  ·  view source on GitHub ↗

============================================================================== Converts an NSString to a std::string

Source from the content-addressed store, hash-verified

142 //==============================================================================
143 /// Converts an NSString to a std::string
144 inline std::string getString (id nsString) { if (nsString) return std::string (call<const char*> (nsString, "UTF8String")); return {}; }
145 /// Converts a raw UTF8 string to an NSString
146 inline id getNSString (const char* s) { return callClass<id> ("NSString", "stringWithUTF8String:", s != nullptr ? s : ""); }
147 /// Converts a UTF8 std::string to an NSString

Callers 6

ValueViewClass · 0.85
castToTypeMethod · 0.85
getMessageFromNSErrorMethod · 0.85
onResourceRequestedMethod · 0.85
performKeyEquivalentMethod · 0.85
DelegateClassMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected