MCPcopy Create free account
hub / github.com/OpenImageDebugger/OpenImageDebugger / set_path_buf

Function set_path_buf

src/host/ui/export_dialog.cpp:55–59  ·  view source on GitHub ↗

Copies `s` into `buf` as a null-terminated C string, truncating to fit if necessary (path_buf is a fixed-size ImGui InputText backing buffer).

Source from the content-addressed store, hash-verified

53// Copies `s` into `buf` as a null-terminated C string, truncating to fit
54// if necessary (path_buf is a fixed-size ImGui InputText backing buffer).
55void set_path_buf(std::array<char, 1024>& buf, std::string_view s) {
56 const std::size_t n = (std::min)(s.size(), buf.size() - 1);
57 std::copy_n(s.begin(), n, buf.begin());
58 buf[n] = '\0';
59}
60
61} // namespace
62

Callers 2

apply_format_extensionFunction · 0.85
open_export_dialogFunction · 0.85

Calls 2

beginMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected