FormatNativeString Function

Formats a string using parameters from a native.

int FormatNativeString(int out_param, int fmt_param, int vararg_param, int out_len, int &written, char[] out_string, const char[] fmt_string)


int out_param

Output parameter number to write to. If 0, out_string is used.

int fmt_param

Format parameter number. If 0, fmt_string is used.

int vararg_param

First variable parameter number.

int out_len

Output string buffer maximum length (always required).

int& written

Optionally stores the number of bytes written.

char[] out_string

Output string buffer to use if out_param is not used.

const char[] fmt_string

Format string to use if fmt_param is not used.

Return Value

SP_ERROR_NONE on success, anything else on failure.


All parameter indexes start at 1.

If the input and output buffers overlap, the contents of the output buffer at the end is undefined.