util_search_list_of_lists

one of the documented procedures in this installation of the ACS
Usage:
util_search_list_of_lists   list_of_lists   query_string   { sublist_element_pos "0" }
What it does:
Returns position of sublist that contains QUERY_STRING at SUBLIST_ELEMENT_POS.
Defined in: /web/philip/packages/acs-core/utilities-procs.tcl

Source code:


    set sublist_index 0
    foreach sublist $list_of_lists {
	set comparison_element [lindex $sublist $sublist_element_pos]
	if { [string compare $query_string $comparison_element] == 0 } {
	    return $sublist_index
	}
	incr sublist_index
    }
    # didn't find it
    return -1


philg@mit.edu