MCPcopy Create free account
hub / github.com/Universal-Team/Universal-Updater / format

Method format

source/utils/stringutils.cpp:129–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

127}
128
129std::string StringUtils::format(const char *fmt_str, ...) {
130 va_list ap;
131 char *fp = nullptr;
132 va_start(ap, fmt_str);
133 vasprintf(&fp, fmt_str, ap);
134 va_end(ap);
135
136 std::unique_ptr<char, decltype(free) *> formatted(fp, free);
137 return std::string(formatted.get());
138}
139
140/*
141 Parse a color hex string (`#RRGGBB`) and return a C2D color.

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected