Share this page

# sprintf

Example: sprintf | Input-Output Functions

Writes formatted output to a string.

    int sprintf( char *string_buffer, const char *format_string[, args]);

string | The target string buffer to which you write the data.
format_string | One or more formatting characters.
args | One or more optional print arguments.

For sprintf details, refer to your C language documentation.

The target string_buffer must be large enough to contain the result of the format_string and args. Buffer overflow if the result string is larger than the buffer may cause erratic behavior in the script.

## Return Values

If successful, the function returns the total number of characters printed. Upon error, it returns a negative number.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: