Core Foundation: add to_string
Signed-off-by: Simon Rozman simon@rozman.si
This commit is contained in:
parent
5f951247aa
commit
c014480acb
@ -75,6 +75,14 @@ namespace macstd {
|
|||||||
strcat(str, h, encoding);
|
strcat(str, h, encoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <typename TR = std::char_traits<char>, typename A = std::allocator<char>>
|
||||||
|
std::basic_string<char, TR, A> to_string(CFStringRef h, CFStringEncoding encoding = kCFStringEncodingUTF8)
|
||||||
|
{
|
||||||
|
std::basic_string<char, TR, A> str;
|
||||||
|
strcat(str, h, encoding);
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Core Foundation string
|
/// Core Foundation string
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user