MCPcopy Create free account
hub / github.com/MayaPosch/NymphCast / format

Function format

src/server/gui/core/utils/StringUtil.cpp:289–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287//////////////////////////////////////////////////////////////////////////
288
289 std::string format(const char* _format, ...)
290 {
291 va_list args;
292 va_list copy;
293
294 va_start(args, _format);
295
296 va_copy(copy, args);
297 const int length = vsnprintf(nullptr, 0, _format, copy);
298 va_end(copy);
299
300 char* buffer = new char[length + 1];
301 va_copy(copy, args);
302 vsnprintf(buffer, length + 1, _format, copy);
303 va_end(copy);
304
305 va_end(args);
306
307 std::string out(buffer);
308 delete[] buffer;
309
310 return out;
311
312 } // format
313
314//////////////////////////////////////////////////////////////////////////
315

Callers 14

sendGlobalStatusUpdateFunction · 0.85
connectClientFunction · 0.85
disconnectFunction · 0.85
session_startFunction · 0.85
session_add_slaveFunction · 0.85
playback_seekFunction · 0.85
mainFunction · 0.85
media_readMethod · 0.85
media_seekMethod · 0.85
triggerReadMethod · 0.85
media_readMethod · 0.85
media_seekMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected