C API Reference -- Ns_SetDeleteKey

### Ns_SetDeleteKey

#### Overview

Remove a field from a set by key name

#### Syntax

        void Ns_SetDeleteKey(
        Ns_Set *set,
        char *key
        );

#### Description

The Ns_SetDeleteKey function removes the field whose key name matches the given key. Any fields that follow the deleted field are moved up to keep the set contiguous. If more than one field in the set has the same key name, Ns_Set-DeleteKey deletes just the first field.

The Ns_SetIDeleteKey function is this function's case-insensitive counterpart.

#### Examples

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

Top of Page
Copyright © 1998-99 America Online, Inc.