| 122 | } |
| 123 | |
| 124 | String 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 | |
| 139 | CFStringRef AppleUtils::ToString(const StringView& str) |
| 140 | { |
nothing calls this directly
no test coverage detected