Back to index

php5  5.3.10
Functions
php_sprintf.c File Reference
#include <stdio.h>
#include <stdarg.h>
#include "php.h"
#include <php_config.h>

Go to the source code of this file.

Functions

PHPAPI int php_sprintf (char *s, const char *format,...)

Function Documentation

PHPAPI int php_sprintf ( char *  s,
const char *  format,
  ... 
)

Definition at line 31 of file php_sprintf.c.

{
  va_list args;
  int ret;

  va_start (args, format);
  s[0] = '\0';
  ret = vsprintf (s, format, args);
  va_end (args);
  return (ret < 0) ? -1 : ret;
}