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

Ns_SetIGet

Overview

Return the value for a field case-insensitively

Syntax

    char *Ns_SetIGet(
    	Ns_Set		*set,
    	char 		*key
    );

Description

The Ns_SetIGet function is the case-insensitive counterpart to the Ns_SetGet function. It returns the value of the first field whose key name matches the given key case-insensitively. Ns_SetIGet returns NULL if no field is found. If more than one field in the set has the same key name, Ns_SetIGet returns just the first field.

Example

    Ns_Set *aSet;
    int index;
    
    aSet = Ns_SetCreate("");
    Ns_SetPut(aSet, "Foo", "foovalue");
    Ns_SetPut(aSet, "Bar", "barvalue");
    Ns_Log(Notice, "Value for foo is %s", Ns_SetIGet(aSet, "foo"));
    Ns_SetFree(aSet);

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.