| 247 | } |
| 248 | |
| 249 | std::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 |
no test coverage detected