MCPcopy Create free account
hub / github.com/Kitware/CMake / kwsysEncoding_DupToWide

Function kwsysEncoding_DupToWide

Source/kwsys/EncodingC.c:32–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30}
31
32wchar_t* kwsysEncoding_DupToWide(char const* str)
33{
34 wchar_t* ret = NULL;
35 size_t length = kwsysEncoding_mbstowcs(NULL, str, 0) + 1;
36 if (length > 0) {
37 ret = (wchar_t*)malloc((length) * sizeof(wchar_t));
38 if (ret) {
39 ret[0] = 0;
40 kwsysEncoding_mbstowcs(ret, str, length);
41 }
42 }
43 return ret;
44}
45
46size_t kwsysEncoding_wcstombs(char* dest, wchar_t const* str, size_t n)
47{

Callers 5

testHelloWorldEncodingFunction · 0.85
kwsysProcess_AddCommandFunction · 0.85
kwsysProcess_ExecuteFunction · 0.85

Calls 1

kwsysEncoding_mbstowcsFunction · 0.85

Tested by 1

testHelloWorldEncodingFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…