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

Function UTIL_Format

extensions/structs/extension.cpp:48–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46IGameConfig *conf;
47
48size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
49{
50 va_list ap;
51 va_start(ap, fmt);
52 size_t len = vsnprintf(buffer, maxlength, fmt, ap);
53 va_end(ap);
54
55 if (len >= maxlength)
56 {
57 buffer[maxlength - 1] = '\0';
58 return (maxlength - 1);
59 }
60 else
61 {
62 return len;
63 }
64}
65
66void Structs::SDK_OnAllLoaded()
67{

Callers 2

SetStringMethod · 0.70
ReadSMC_NewSectionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected