MCPcopy Create free account
hub / github.com/chronoxor/CppLogging / RestoreFormatString

Function RestoreFormatString

source/logging/record.cpp:249–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249std::string RestoreFormatString(std::string_view pattern, const std::vector<uint8_t>& buffer, size_t& offset, size_t size)
250{
251 fmt::dynamic_format_arg_store<fmt::format_context> store;
252
253 // Parse format arguments from the buffer and prepare dynamic format storage
254 size_t index = offset;
255 while (index < (offset + size))
256 if (!ParseArgument(store, buffer, index))
257 break;
258 offset = index;
259
260 // Perform format operation
261 std::string result = fmt::vformat(pattern, store);
262
263 return result;
264}
265
266} // namespace
267

Callers 2

ParseArgumentFunction · 0.85
RestoreFormatMethod · 0.85

Calls 1

ParseArgumentFunction · 0.85

Tested by

no test coverage detected