Append a formatted string to an Ns_DString
char *Ns_DStringPrintf( Ns_DString *dsPtr, char *fmt, ... );
The Ns_DStringPrintf function appends a string that has been created by calling the sprintf function with the given format and optional arguments.*
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 */