| 28 | const std::string CompositionBmpSuffix = "_bmp"; |
| 29 | |
| 30 | std::string AeMemoryHandleToString(const AEGP_MemHandle& handle) { |
| 31 | if (handle == nullptr) { |
| 32 | return ""; |
| 33 | } |
| 34 | const auto& suites = GetSuites(); |
| 35 | |
| 36 | char16_t* str = nullptr; |
| 37 | suites->MemorySuite1()->AEGP_LockMemHandle(handle, reinterpret_cast<void**>(&str)); |
| 38 | std::string u8Str = Utf16ToUtf8(str); |
| 39 | suites->MemorySuite1()->AEGP_UnlockMemHandle(handle); |
| 40 | if (u8Str.empty() && str != nullptr && str[0] != u'\0') { |
| 41 | LOGE("AeMemoryHandleToString failed to convert UTF-16 content to UTF-8."); |
| 42 | } |
| 43 | |
| 44 | return u8Str; |
| 45 | } |
| 46 | |
| 47 | bool LastIsSpace(const std::string& text) { |
| 48 | if (text.empty()) { |
no test coverage detected