rtoss - Blame information for rev 275

Subversion Repositories:
Rev:
Rev Author Line No. Line
275 roytam 1 func strrpos {str find last} {
2 set i 0
3 set j 0
4 set first 1
5 if [expr $last > 0] {
6 set str [substr $str 0 $last]
7 }
8 while not {$i == -1} {
9 if $first {
10 set first 0
11 set i -1
12 }
13 set j $i
14 set i [strpos $str $find [expr $i + 1]]
15 if [expr $i == -1] {
16 return $j
17 }
18 }
19 return -1
20 }
21  
22 # Get $EXEPATH
23 set a [strrpos [lilpath] "\\" 0]
24 print [substr [lilpath] 0 $a]