FormatEx Function

Formats a string according to the SourceMod format rules (see documentation).

int FormatEx(char[] buffer, int maxlength, const char[] format, any... ...)


char[] buffer

Destination string buffer.

int maxlength

Maximum length of output string buffer.

const char[] format

Formatting rules.

any... ...

Variable number of format parameters.

Return Value

Number of characters written to the buffer, not including the null terminator.


This is the same as Format(), except none of the input buffers can overlap the same memory as the output buffer. Since this security check is removed, it is slightly faster.