Writes formatted data into a buffer, specifying size.


int uszprintf(char *buf, int size, const char *format, ...);
This function writes formatted data into the output buffer, whose length in bytes is specified by `size' and which is guaranteed to be NULL terminated. Example:
      char buffer[10];
      int player_score;
      uszprintf(buffer, sizeof(buffer), "Your score is: %d", player_score);
Returns the number of characters that would have been written without eventual truncation (like with usprintf), not including the terminating null character.
Examples using this:

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: