All pastes #435276 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-11 21:28 UTC
rendered paste body
		# --nX switch (start)
		set num "10"
		set switch [lindex [split $args] 0]
		# switches set
		if {[regexp -- {--n[0-9]{0,}} $switch]} {
		set num [string range $switch 3 end]
		set rest [join [lrange [split $args] 1 end]]
		regsub -all -- {n}	$num	""	num
		} else {set rest [join [lrange [split $args] 0 end]]} 
		# --nX switch (end)

		set rest [string map {"{" "" "}" ""} "$rest"]