55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
+
+
+
+
+
-
+
|
set pos [lsearch -exact $list $item]
if {$pos < 0} return
set list [lreplace $list $pos $pos]
return
}
# Delete item from list by name
proc striptrailingslash {path} {
# split and rejoin gets rid of a traling / character.
return [eval [linsert [file split $path] 0 file join]]
}
# # ## ### ##### ######## #############
}
namespace eval ::vc::tools::misc {
namespace export sp nsp max ldelete
namespace export sp nsp max ldelete striptrailingslash
}
# -----------------------------------------------------------------------------
# Ready
package provide vc::tools::misc 1.0
return
|