MCPcopy Create free account
hub / github.com/VCVRack/Rack / fV

Function fV

src/string.cpp:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31
32
33std::string fV(const char* format, va_list args) {
34 // va_lists cannot be reused but we need it twice, so clone args.
35 va_list args2;
36 va_copy(args2, args);
37 DEFER({va_end(args2);});
38 // Compute size of required buffer
39 int size = vsnprintf(NULL, 0, format, args);
40 if (size < 0)
41 return "";
42 // Create buffer
43 std::string s;
44 s.resize(size);
45 vsnprintf(&s[0], size + 1, format, args2);
46 return s;
47}
48
49
50std::string lowercase(const std::string& s) {

Callers 2

ExceptionMethod · 0.85
fFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected