int Ns_SetPut( Ns_Set *set, char *key, char *value );
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.
Ns_Set *aSet; aSet = Ns_SetCreate(""); Ns_SetPut(aSet, "foo", "foovalue"); Ns_SetPut(aSet, "bar", "barvalue"); /* finish processing of aSet */ Ns_SetFree(aSet);