NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_findset(n) 5.0.0a naviserver "NaviServer Built-in Commands"

Name

ns_findset - Find a set by its name from a list of sets

Table Of Contents

Synopsis

Description

This command is used to find a set by its name from a list of sets and returns the setId of the first set whose name matches name, or returns an empty string if no set matches.

COMMANDS

ns_findset sets name

EXAMPLES

 % set sets [list]
 % lappend sets [ns_set create foo]
 d0
 
 % lappend sets [ns_set create bar]
 d0 d1
 
 % lappend sets [ns_set create baz]
 d0 d1 d2
 
 % ns_findset $sets bar
 d1
 
 % llength [ns_findset $sets quux]
 0
 
 % ns_set cleanup

See Also

ns_set

Keywords

ns_set