template::util::alphabetized_index (private)

 template::util::alphabetized_index list entry

Defined in packages/acs-templating/tcl/doc-tcl-procs.tcl

takes an alphabetized list and an entry

Parameters:
list (required)
{let's see how this parses out} the alphabetized list
entry (required)
req the value to be inserted
Returns:
either the proper list index for an alphabetized insertion or -1 if the entry is already in the list

Partial Call Graph (max 5 caller/called nodes):
%3 doc::parse_namespace doc::parse_namespace (private) template::util::alphabetized_index template::util::alphabetized_index doc::parse_namespace->template::util::alphabetized_index

Testcases:
No testcase defined.
Source code:

    set result [lsearch -exact $list $entry]
    if { $result != -1 } {
        return -1
    }

    for {set i 0} {$i < [llength $list] } { incr i } {
        if { [string compare -nocase $entry [lindex $list $i]] < 0 } {
            return $i
        }
    }

    return $i
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: