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

Method append

extern/imgui/imgui.cpp:2547–2563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2545char ImGuiTextBuffer::EmptyString[1] = { 0 };
2546
2547void ImGuiTextBuffer::append(const char* str, const char* str_end)
2548{
2549 int len = str_end ? (int)(str_end - str) : (int)strlen(str);
2550
2551 // Add zero-terminator the first time
2552 const int write_off = (Buf.Size != 0) ? Buf.Size : 1;
2553 const int needed_sz = write_off + len;
2554 if (write_off + len >= Buf.Capacity)
2555 {
2556 int new_capacity = Buf.Capacity * 2;
2557 Buf.reserve(needed_sz > new_capacity ? needed_sz : new_capacity);
2558 }
2559
2560 Buf.resize(needed_sz);
2561 memcpy(&Buf[write_off - 1], str, (size_t)len);
2562 Buf[write_off - 1 + len] = 0;
2563}
2564
2565void ImGuiTextBuffer::appendf(const char* fmt, ...)
2566{

Callers 15

TableSetupColumnMethod · 0.45
DebugLogVMethod · 0.45
TabItemExMethod · 0.45
to_unicodeMethod · 0.45
fill_line_bufferMethod · 0.45
get_stringMethod · 0.45
addRigidBodyFunction · 0.45
addTriangleModelFunction · 0.45
addTetModelFunction · 0.45
addBallJointFunction · 0.45

Calls 4

ImMaxFunction · 0.85
reserveMethod · 0.45
resizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected