|
|
char *Ns_SetGet(
Ns_Set *set,
char *key
);
The Ns_SetGet function returns the value of the first field whose key name matches the given key. Ns_SetGet returns NULL if no field is found. If more than one field in the set has the same key name, Ns_SetGet returns just the first field.
The Ns_SetIGet function is this function's case-insensitive counterpart.
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_SetGet(aSet, "Foo"));
Ns_SetFree(aSet);