diff --git a/include/MacStd/CoreFoundation.hpp b/include/MacStd/CoreFoundation.hpp index f9f76f1..c98d561 100644 --- a/include/MacStd/CoreFoundation.hpp +++ b/include/MacStd/CoreFoundation.hpp @@ -75,6 +75,14 @@ namespace macstd { strcat(str, h, encoding); } + template , typename A = std::allocator> + std::basic_string to_string(CFStringRef h, CFStringEncoding encoding = kCFStringEncodingUTF8) + { + std::basic_string str; + strcat(str, h, encoding); + return str; + } + /// /// Core Foundation string ///