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

Function UTIL_Format

extensions/tf2/util.cpp:35–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#include "util.h"
34
35size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
36{
37 va_list ap;
38 va_start(ap, fmt);
39 size_t len = vsnprintf(buffer, maxlength, fmt, ap);
40 va_end(ap);
41
42 if (len >= maxlength)
43 {
44 buffer[maxlength - 1] = '\0';
45 return (maxlength - 1);
46 }
47 else
48 {
49 return len;
50 }
51}
52
53bool UTIL_FindDataTable(SendTable *pTable,
54 const char *name,

Callers 2

SDK_OnLoadMethod · 0.70
ProcessCommandTargetMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected