diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-06-15 01:02:30 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-06-15 01:02:30 +0800 |
commit | d868d7b0d463ede80b761f87f10d4e25f52989c3 (patch) | |
tree | eb61e339f15b6b8b4cc1a246b4281631e701d6e0 /include/cru/base/String.h | |
parent | 7ac84c9d200d43f50155ce1e8316ada12043f7a8 (diff) | |
download | cru-d868d7b0d463ede80b761f87f10d4e25f52989c3.tar.gz cru-d868d7b0d463ede80b761f87f10d4e25f52989c3.tar.bz2 cru-d868d7b0d463ede80b761f87f10d4e25f52989c3.zip |
Remove some files of OSX. Symbol Point is conflict and needs to be
fixed.
Diffstat (limited to 'include/cru/base/String.h')
-rw-r--r-- | include/cru/base/String.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/cru/base/String.h b/include/cru/base/String.h index 21a3db51..49c96c4a 100644 --- a/include/cru/base/String.h +++ b/include/cru/base/String.h @@ -14,6 +14,11 @@ #include <type_traits> #include <vector> +#ifdef CRU_PLATFORM_OSX +#include <CoreFoundation/CoreFoundation.h> +#include <cru/base/Osx.h> +#endif + namespace cru { class StringView; @@ -237,6 +242,11 @@ class CRU_BASE_API String { } #endif +#ifdef CRU_PLATFORM_OSX + CFWrapper<CFStringRef> ToCFStringRef() const; + static String FromCFStringRef(CFStringRef string); +#endif + template <typename... T> String Format(T&&... args) const; @@ -380,6 +390,10 @@ class CRU_BASE_API StringView { std::string ToUtf8() const; Buffer ToUtf8Buffer(bool end_zero = true) const; +#ifdef CRU_PLATFORM_OSX + CFWrapper<CFStringRef> ToCFStringRef() const; +#endif + private: const char16_t* ptr_; Index size_; |