lang::util::convert_adp_variables_to_percentage_signs (private)

 lang::util::convert_adp_variables_to_percentage_signs text

Defined in packages/acs-lang/tcl/lang-util-procs.tcl

Convert ADP variables to percentage_signs - the notation used to interpolate variable values into acs-lang messages.

Parameters:
text
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 test_util__convert_adp_variables_to_percentage_signs util__convert_adp_variables_to_percentage_signs (test acs-lang) lang::util::convert_adp_variables_to_percentage_signs lang::util::convert_adp_variables_to_percentage_signs test_util__convert_adp_variables_to_percentage_signs->lang::util::convert_adp_variables_to_percentage_signs template::adp_array_variable_regexp template::adp_array_variable_regexp (public) lang::util::convert_adp_variables_to_percentage_signs->template::adp_array_variable_regexp template::adp_array_variable_regexp_noquote template::adp_array_variable_regexp_noquote (public) lang::util::convert_adp_variables_to_percentage_signs->template::adp_array_variable_regexp_noquote template::adp_variable_regexp template::adp_variable_regexp (public) lang::util::convert_adp_variables_to_percentage_signs->template::adp_variable_regexp template::adp_variable_regexp_noquote template::adp_variable_regexp_noquote (public) lang::util::convert_adp_variables_to_percentage_signs->template::adp_variable_regexp_noquote lang::util::replace_temporary_tags_with_lookups lang::util::replace_temporary_tags_with_lookups (public) lang::util::replace_temporary_tags_with_lookups->lang::util::convert_adp_variables_to_percentage_signs

Testcases:
util__convert_adp_variables_to_percentage_signs
Source code:
    # substitute array variable references
    # loop to handle the case of adjacent variable references, like @a@@b@
    while {[regsub -all [template::adp_array_variable_regexp$text {\1%\2.\3%} text]} {}
    while {[regsub -all [template::adp_array_variable_regexp_noquote$text {\1%\2.\3;noquote%} text]} {}

    # substitute simple variable references
    while {[regsub -all [template::adp_variable_regexp$text {\1%\2%} text]} {}
    while {[regsub -all [template::adp_variable_regexp_noquote$text {\1%\2;noquote%} text]} {}

    return $text
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/lang-util-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: