View Single Post
Old 06-29-2004, 01:19 PM  
jeza
Senior Member
 
jeza's Avatar
 
Join Date: May 2003
Posts: 530
Default

there is a missing proces replacevar


proc replacevar {strin what withwhat} {

set output $strin
set replacement $withwhat
set cutpos 0
while { [string first $what $output] != -1 } {
set cutstart [expr [string first $what $output] - 1]
set cutstop [expr $cutstart + [string length $what] + 1]
set output [string range $output 0 $cutstart]$replacement[string range $output $cutstop end]
}
return $output
}
jeza is offline   Reply With Quote