MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / UTIL_Format

Function UTIL_Format

public/mms_sample_ext/stub_util.cpp:21–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include "stub_util.h"
20
21size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
22{
23 va_list ap;
24
25 va_start(ap, fmt);
26 size_t len = vsnprintf(buffer, maxlength, fmt, ap);
27 va_end(ap);
28
29 if (len >= maxlength)
30 {
31 len = maxlength - 1;
32 buffer[len] = '\0';
33 }
34
35 return len;
36}
37
38

Callers 2

BindToSourcemodMethod · 0.70
SM_LoadExtensionFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected