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

Ns_SetPut

Overview

Add a field to an Ns_Set

Syntax

    int Ns_SetPut(
    Ns_Set *set,
    char *key,
    char *value
    );

Description

The Ns_SetPut function adds a new field to a set whose key name is the given key and value is the given value. The value of the new field may be NULL. The index of the new field is returned. Ns_SetPut strcpy's the value and uses realloc's to adjust the size of the fields to accommodate.

Examples

    Ns_Set *aSet;
    aSet = Ns_SetCreate("");
    Ns_SetPut(aSet, "foo", "foovalue");
    Ns_SetPut(aSet, "bar", "barvalue");
    /* finish processing of aSet */
    Ns_SetFree(aSet);

Top of Page

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