MCPcopy Create free account
hub / github.com/KebsCS/KBotExt / ImStrdupcpy

Function ImStrdupcpy

KBotExt/imgui/imgui.cpp:1757–1769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755}
1756
1757char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
1758{
1759 size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
1760 size_t src_size = strlen(src) + 1;
1761 if (dst_buf_size < src_size)
1762 {
1763 IM_FREE(dst);
1764 dst = (char*)IM_ALLOC(src_size);
1765 if (p_dst_size)
1766 *p_dst_size = src_size;
1767 }
1768 return (char*)memcpy(dst, (const void*)src, src_size);
1769}
1770
1771const char* ImStrchrRange(const char* str, const char* str_end, char c)
1772{

Callers 1

BeginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected