comparison utillib.tcl @ 664:586caf75fccc

utillib: Add utl_arg_rest helper.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 20 Feb 2021 17:44:49 +0200
parents 33580ee2579e
children 204699e84dee
comparison
equal deleted inserted replaced
663:8bde8f798188 664:586caf75fccc
144 144
145 return 1 145 return 1
146 } 146 }
147 147
148 148
149 proc utl_arg_rest {uarglist uindex ustr} {
150 upvar $ustr dstr
151
152 if {$uindex < [llength $uarglist]} {
153 set dstr [join [lrange $uarglist $uindex end] " "]
154 return 1
155 } else {
156 set dstr ""
157 return 0
158 }
159 }
160
161
149 ### 162 ###
150 ### HTML / HTTP related 163 ### HTML / HTTP related
151 ### 164 ###
152 # Convert given string, containing HTML/XML style entities into a normal 165 # Convert given string, containing HTML/XML style entities into a normal
153 # UTF-8 Unicode string, using the above entity->character mapping 166 # UTF-8 Unicode string, using the above entity->character mapping