MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / wstring_dup

Function wstring_dup

dds/FACE/StringManager.cpp:51–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51WChar* wstring_dup(const WChar* str)
52{
53 if (!str) return 0;
54 if (!*str) return &s_wempty;
55 const size_t len = std::wcslen(str);
56 WChar* const cpy = wstring_alloc(static_cast<UnsignedLong>(len));
57 if (cpy) std::wcsncpy(cpy, str, len + 1);
58 return cpy;
59}
60
61void wstring_free(WChar* str)
62{

Callers 11

SingleValueMethod · 0.85
get_wstringMethod · 0.85
copyMethod · 0.85
read_basic_valueMethod · 0.85
get_s16_raw_valueMethod · 0.85
set_s16_raw_valueMethod · 0.85
ACE_ALLOCATOR_NEWFunction · 0.85
set_messageMethod · 0.85
dupMethod · 0.85

Calls 1

wstring_allocFunction · 0.70

Tested by

no test coverage detected