MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / ImStrdupcpy

Function ImStrdupcpy

plugins/Cardinal/src/DearImGui/imgui.cpp:1373–1385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1371}
1372
1373char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
1374{
1375 size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
1376 size_t src_size = strlen(src) + 1;
1377 if (dst_buf_size < src_size)
1378 {
1379 IM_FREE(dst);
1380 dst = (char*)IM_ALLOC(src_size);
1381 if (p_dst_size)
1382 *p_dst_size = src_size;
1383 }
1384 return (char*)memcpy(dst, (const void*)src, src_size);
1385}
1386
1387const char* ImStrchrRange(const char* str, const char* str_end, char c)
1388{

Callers 1

BeginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected