uszprintf(3alleg)

uszprintf3alleg

Writes formatted data into a buffer, specifying size. allegro game programming library.

Usage

#include <allegro.h>

int uszprintf(char *buf, int size, const char *format, ...);

Overview

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);

Return value

Returns the number of characters that would have been written without eventual truncation (like with usprintf), not including the terminating null character.

Releases

4 releases since Debian 3.1 (Sarge); the text changed 2 times.

  1. 3.1
  2. 4.0
  3. 5.0–6.0

From liballegro-doc 2:4.2.2-2.2 in Debian 6.0 (Squeeze). Parsed by carta from the page's man source.