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

Function UTIL_Format

tools/gdc/gdc.cpp:249–265  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249size_t UTIL_Format(char *buffer, size_t maxlength, const char *fmt, ...)
250{
251 va_list ap;
252 va_start(ap, fmt);
253 size_t len = vsnprintf(buffer, maxlength, fmt, ap);
254 va_end(ap);
255
256 if (len >= maxlength)
257 {
258 buffer[maxlength - 1] = '\0';
259 return (maxlength - 1);
260 }
261 else
262 {
263 return len;
264 }
265}
266

Callers 5

ParseSMCFileMethod · 0.70
ParseSMCStreamMethod · 0.70
ReadSMC_NewSectionMethod · 0.70
ReparseMethod · 0.70
LoadGameConfigFileMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected