MCPcopy Create free account
hub / github.com/Tencent/libpag / AeMemoryHandleToString

Function AeMemoryHandleToString

exporter/src/utils/StringHelper.cpp:30–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28const std::string CompositionBmpSuffix = "_bmp";
29
30std::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
47bool LastIsSpace(const std::string& text) {
48 if (text.empty()) {

Callers 6

GetProjectNameFunction · 0.85
GetProjectPathFunction · 0.85
GetLayerNameFunction · 0.85
GetItemNameFunction · 0.85
ExportMarkersFunction · 0.85
GetMarkerCommentFunction · 0.85

Calls 3

GetSuitesFunction · 0.85
Utf16ToUtf8Function · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected