char *Ns_DStringValue( Ns_DString *dsPtr );
The Ns_DStringValue macro returns a pointer to the current value of an Ns_DString. This may be a pointer to the Ns_DString's static space or to a string allocated on the heap if the static space has overflowed. It is not safe to use the value returned by this macro after an intervening call to Ns_DStringAppend because the Ns_DString string could overflow to or move within the heap.
Ns_DString ds; Ns_DStringInit(&ds); Ns_DStringAppend(&ds, "foo"); /* do something with the dstring */ printf ("%s\n", Ns_DStringValue(&ds)); Ns_DStringFree(&ds); /* finished with dstring */