MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / string_format

Function string_format

common/common.cpp:402–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

400//
401
402std::string string_format(const char * fmt, ...) {
403 va_list ap;
404 va_list ap2;
405 va_start(ap, fmt);
406 va_copy(ap2, ap);
407 int size = vsnprintf(NULL, 0, fmt, ap);
408 GGML_ASSERT(size >= 0 && size < INT_MAX); // NOLINT
409 std::vector<char> buf(size + 1);
410 int size2 = vsnprintf(buf.data(), size + 1, fmt, ap2);
411 GGML_ASSERT(size2 == size);
412 va_end(ap2);
413 va_end(ap);
414 return std::string(buf.data(), size);
415}
416
417std::string string_strip(const std::string & str) {
418 size_t start = 0;

Callers 13

to_argsMethod · 0.70
set_optionMethod · 0.70
apply_to_paramsMethod · 0.70
load_from_iniMethod · 0.70
load_from_models_dirMethod · 0.70
read_fileFunction · 0.70
common_params_parse_exFunction · 0.70
parse_device_listFunction · 0.70
common_params_to_mapFunction · 0.70
write_fileFunction · 0.70
get_url_tasksFunction · 0.70

Calls 2

stringClass · 0.85
dataMethod · 0.45

Tested by

no test coverage detected