doc::util::text_divider (private)
doc::util::text_divider text_ref marker
Defined in packages/acs-templating/tcl/doc-tcl-procs.tcl
divides a string variable into a list of strings, all but the first element beginning with the indicated text marker; the first element of the created list contains all of the string preceding the first occurrence of the text marker
- Parameters:
- text_ref (required)
- name of string variable (not the string value itself)
- marker (required)
- the string indicating text division
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: upvar $text_ref text set indices_list [doc::util::find_marker_indices $text $marker] set result_list [list] # first check for no markers present if { $indices_list eq "end" } { set text [list $text] return 0 } set old_index 0 foreach index $indices_list { lappend result_list [string range $text $old_index $index] set old_index [expr {$index + 1}] } lappend result_list [string range $text $old_index end] set text $result_list return 1XQL Not present: Generic, PostgreSQL, Oracle