MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / ImStrdupcpy

Function ImStrdupcpy

lib/imgui/imgui.cpp:1268–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1266}
1267
1268char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
1269{
1270 size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
1271 size_t src_size = strlen(src) + 1;
1272 if (dst_buf_size < src_size)
1273 {
1274 IM_FREE(dst);
1275 dst = (char*)IM_ALLOC(src_size);
1276 if (p_dst_size)
1277 *p_dst_size = src_size;
1278 }
1279 return (char*)memcpy(dst, (const void*)src, src_size);
1280}
1281
1282const char* ImStrchrRange(const char* str, const char* str_end, char c)
1283{

Callers 1

BeginMethod · 0.85

Calls 1

memcpyFunction · 0.85

Tested by

no test coverage detected