MCPcopy Create free account
hub / github.com/VictorGordan/opengl-tutorials / ImStrdupcpy

Function ImStrdupcpy

ImGUI GLFW Tutorial/imgui/imgui.cpp:1327–1339  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1325}
1326
1327char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
1328{
1329 size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
1330 size_t src_size = strlen(src) + 1;
1331 if (dst_buf_size < src_size)
1332 {
1333 IM_FREE(dst);
1334 dst = (char*)IM_ALLOC(src_size);
1335 if (p_dst_size)
1336 *p_dst_size = src_size;
1337 }
1338 return (char*)memcpy(dst, (const void*)src, src_size);
1339}
1340
1341const char* ImStrchrRange(const char* str, const char* str_end, char c)
1342{

Callers 1

BeginMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected