Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v diff -u -r1.70 -r1.70.2.1 --- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 26 Feb 2004 15:28:54 -0000 1.70 +++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 22 Mar 2004 02:46:03 -0000 1.70.2.1 @@ -4839,3 +4839,17 @@ } } + +ad_proc -public util::string_length_compare { s1 s2 } { + String length comparison function for use with lsort's -command switch. +} { + set l1 [string length $s1] + set l2 [string length $s2] + if { $l1 < $l2 } { + return -1 + } elseif { $l1 > $l2 } { + return 1 + } else { + return 0 + } +}