MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / ToString

Method ToString

Source/Engine/Platform/Apple/ApplePlatform.cpp:124–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122}
123
124String AppleUtils::ToString(CFStringRef str)
125{
126 if (!str)
127 return String::Empty;
128 String result;
129 const int32 length = CFStringGetLength(str);
130 if (length > 0)
131 {
132 CFRange range = CFRangeMake(0, length);
133 result.ReserveSpace(length);
134 CFStringGetBytes(str, range, kCFStringEncodingUTF16LE, '?', false, (uint8*)result.Get(), length * sizeof(Char), nullptr);
135 }
136 return result;
137}
138
139CFStringRef AppleUtils::ToString(const StringView& str)
140{

Callers

nothing calls this directly

Calls 4

ReserveSpaceMethod · 0.80
GetMethod · 0.45
GetTextMethod · 0.45
LengthMethod · 0.45

Tested by

no test coverage detected