From: phoneben <3232963@gmail.com> Date: Tue, 18 Jul 2023 22:05:15 +0000 (+0300) Subject: func_cut: Add example to documentation. X-Git-Tag: 18.20.0-rc1~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af1802bb4bd15142c2e983dad7b7cde485308202;p=thirdparty%2Fasterisk.git func_cut: Add example to documentation. This adds an example to the XML documentation clarifying usage of the CUT function to address a common misusage. (cherry picked from commit 3e91137404b561aec0b697fb65806e6ff2457287) --- diff --git a/funcs/func_cut.c b/funcs/func_cut.c index f8bc4941ec..a0d508d575 100644 --- a/funcs/func_cut.c +++ b/funcs/func_cut.c @@ -75,6 +75,10 @@ Cut out information from a string (varname), based upon a named delimiter. + + exten => s,1,Set(foo=${CUT(bar,,2)}); This is correct syntax + exten => s,2,Set(foo=${CUT(${bar},,2)}); This is invalid syntax (unless bar contains the name of another variable) + ***/