[ Previous ] [ Contents ] [ Index ] [ Next ]

Ns_DStringPrintf

Overview

Append a formatted string to an Ns_DString

Syntax

    char *Ns_DStringPrintf(
    Ns_DString *dsPtr,
    char *fmt,
    ...
    );

Description

The Ns_DStringPrintf function appends a string that has been created by calling the sprintf function with the given format and optional arguments. This function currently uses a fixed length buffer of 1024 characters to sprintf() the data before appending to the Ns_DString.

Examples

    Ns_DString ds;
    
    Ns_DStringInit(&ds);
    Ns_DStringPrintf(&ds, "/path%d", getpid());
    /* do something with dstring */
    printf ("%s\n", ds.string);
    Ns_DStringFree(&ds); /* finished with dstring */

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.