url_from_list

one of the documented procedures in this installation of the ACS
Usage:
url_from_list   url_list
What it does:
given url list as described in ug_parse_url this procedure puts back the url from the list. thus, if list contains elements A, B and C, this procedure will return A/B/C. if list contains elements A, B, C and / than this procedure will return A/B/C/
Defined in: /web/philip/tcl/user-group-defs.tcl

Source code:


    set url_list_length [llength $url_list]

    if { $url_list_length < 1 } {
	return ""
    } 

    set first_url_element [lindex $url_list 0]
    if { [string compare $first_url_element /]==0 } {
	return "/"
    }

    set last_url_element [lindex $url_list [expr $url_list_length - 1]]
    if { [string compare $last_url_element /]==0 } {
	return "[join [lrange $url_list 0 [expr $url_list_length - 2]] /]/"
    } else {
	return "[join [lrange $url_list 0 [expr $url_list_length - 1]] /]"
    }


philg@mit.edu