Tcl Source Code

Artifact [c5c7cd2566]
Login

Artifact c5c7cd2566c845f1258c6f64c2685b55244e5cd5:

Attachment "stringreplace.tcl" to ticket [3408718fff] added by anonymous 2015-05-08 20:42:29. (unpublished)
if {{string} ne [info procs]} {
	rename string string_orig
}

proc string {args} {
	switch [lindex $args 0] {
		replace {
			return [string_orig range [lindex $args 1] 0 [expr {[lindex $args 2]-1}]][lindex $args 4][string_orig range [lindex $args 1] [expr {[lindex $args 3]+1}] end]
		}
		default {
			string_orig {*}$args
		}
	}
}