apidoc::length_regexp (private)
apidoc::length_regexp data
Defined in packages/acs-api-browser/tcl/acs-api-documentation-procs.tcl
Calculate how much text we should ignore.
- Parameters:
- data (required)
- Returns:
- length in characters.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set i 0 set found_regexp 0 set curchar [string index $data $i] while {$curchar ne "\$" && $curchar ne "\[" && ($curchar ne "\{" || !$found_regexp)} { if {$curchar eq "\{"} {set found_regexp 1} if {[string range $data $i $i+5] eq "-start"} { incr i [length_exp [string range $data $i end]] ;# -start incr i [length_exp [string range $data $i end]] ;# spaces incr i [length_exp [string range $data $i end]] ;# expression - it could be a var } set expr_length [length_exp [string range $data $i end]] if {$expr_length == 0} { break } incr i $expr_length set curchar [string index $data $i] } return [expr {$i - 1}]XQL Not present: Generic, PostgreSQL, Oracle