From 83dd36ba136c1d6a564408504c82c2fd2675eb47 Mon Sep 17 00:00:00 2001 From: phoneben <3232963@gmail.com> Date: Wed, 19 Jul 2023 01:05:15 +0300 Subject: [PATCH] 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. --- funcs/func_cut.c | 4 ++++ 1 file changed, 4 insertions(+) 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) + ***/