MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/PositionBasedDynamics / ImStrdupcpy

Function ImStrdupcpy

extern/imgui/imgui.cpp:1714–1726  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1712}
1713
1714char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
1715{
1716 size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
1717 size_t src_size = strlen(src) + 1;
1718 if (dst_buf_size < src_size)
1719 {
1720 IM_FREE(dst);
1721 dst = (char*)IM_ALLOC(src_size);
1722 if (p_dst_size)
1723 *p_dst_size = src_size;
1724 }
1725 return (char*)memcpy(dst, (const void*)src, src_size);
1726}
1727
1728const char* ImStrchrRange(const char* str, const char* str_end, char c)
1729{

Callers 1

BeginMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected