[ 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.*

Example

    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 © 1996 America Online, Inc.