summaryrefslogtreecommitdiffstats
path: root/2024/tcl/lib.tcl
diff options
context:
space:
mode:
Diffstat (limited to '2024/tcl/lib.tcl')
-rw-r--r--2024/tcl/lib.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/2024/tcl/lib.tcl b/2024/tcl/lib.tcl
index 698bb9a..2968072 100644
--- a/2024/tcl/lib.tcl
+++ b/2024/tcl/lib.tcl
@@ -39,3 +39,11 @@ proc regroup {pat {var input}} {
lappend list2 $cur
set list $list2
}
+
+proc sindex {str args} {
+ set ret {}
+ foreach arg $args {
+ append ret [string index $str $arg]
+ }
+ return $ret
+}