| | @@ -23,25 +23,25 @@ |
| 23 | 23 | ## NOTE: Skip second slash. |
| 24 | 24 | ## |
| 25 | 25 | set idx(first+1) [expr {$idx(first) + 2}] |
| 26 | 26 | ## |
| 27 | 27 | ## NOTE: (part 1) The [string first] command does NOT actually |
| 28 | | - ## the optional startIndex argument as specified in the |
| 29 | | - ## TH1 support manual; therefore, we fake it by using the |
| 30 | | - ## [string range] command and then adding the necessary |
| 31 | | - ## offset to the resulting index manually (below). In Tcl, |
| 32 | | - ## we could use the following instead: |
| 28 | + ## support the optional startIndex argument as specified |
| 29 | + ## in the TH1 support manual; therefore, we fake it by |
| 30 | + ## using the [string range] command and then adding the |
| 31 | + ## necessary offset to the resulting index manually |
| 32 | + ## (below). In Tcl, we could use the following instead: |
| 33 | 33 | ## |
| 34 | 34 | ## set idx(next) [string first / $baseurl $idx(first+1)] |
| 35 | 35 | ## |
| 36 | 36 | set idx(nextRange) [string range $baseurl $idx(first+1) end] |
| 37 | 37 | set idx(next) [string first / $idx(nextRange)] |
| 38 | 38 | if {$idx(next) != -1} { |
| 39 | 39 | ## |
| 40 | | - ## NOTE: (part 2) Add the necessary offset to the result of the |
| 41 | | - ## search for the next slash (i.e. the one after the initial |
| 42 | | - ## search for the two slashes). |
| 40 | + ## NOTE: (part 2) Add the necessary offset to the result of |
| 41 | + ## the search for the next slash (i.e. the one after |
| 42 | + ## the initial search for the two slashes). |
| 43 | 43 | ## |
| 44 | 44 | set idx(next) [expr {$idx(next) + $idx(first+1)}] |
| 45 | 45 | ## |
| 46 | 46 | ## NOTE: Back up one character from the next slash. |
| 47 | 47 | ## |
| 48 | 48 | |