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

Ns_DStringAppend

Overview

Append a string to an Ns_DString

Syntax

    char *Ns_DStringAppend(
    Ns_DString *dsPtr,
    char *string
    );

Description

The Ns_DStringAppend macro appends the specified string plus a terminating null character to the end of the Ns_DString. The string may overflow from static space to the heap as a result of calling this function. It returns the string associated with the current Ns_DString.

Examples

    Ns_DString ds;
    Ns_DStringInit(&ds);
    Ns_DStringAppend(&ds, "foo");
    /* do something with the dstring */
    printf("%s\n", ds.string);
    Ns_DStringFree(&ds); /* finished with dstring */

The resulting Ns_DString, ds, would contain "foo\0" and have a length of 3.

Top of Page

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