aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_strings.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-01 16:03:51 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-01 16:03:51 +0000
commit14ce4301aae402f6aea34b26f9fd75b01e2d7985 (patch)
tree226c71dcb71f8b2342c7f721cf781c7c046bd304 /funcs/func_strings.c
parent7cc74524ad3bddf0e7bf6893f775216e3a4fc4ed (diff)
Revert the previous change to FILTER and fix the embedded documentation instead.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@36543 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs/func_strings.c')
-rw-r--r--funcs/func_strings.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 9b7900e81..97132a515 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -68,7 +68,7 @@ static int function_fieldqty(struct ast_channel *chan, char *cmd,
static struct ast_custom_function fieldqty_function = {
.name = "FIELDQTY",
.synopsis = "Count the fields, with an arbitrary delimiter",
- .syntax = "FIELDQTY(<varname>,<delim>)",
+ .syntax = "FIELDQTY(<varname>|<delim>)",
.read = function_fieldqty,
};
@@ -81,10 +81,10 @@ static int filter(struct ast_channel *chan, char *cmd, char *parse, char *buf,
);
char *outbuf = buf;
- AST_NONSTANDARD_APP_ARGS(args, parse, ',');
+ AST_STANDARD_APP_ARGS(args, parse);
if (!args.string) {
- ast_log(LOG_ERROR, "Usage: FILTER(<allowed-chars>,<string>)\n");
+ ast_log(LOG_ERROR, "Usage: FILTER(<allowed-chars>|<string>)\n");
return -1;
}
@@ -100,7 +100,7 @@ static int filter(struct ast_channel *chan, char *cmd, char *parse, char *buf,
static struct ast_custom_function filter_function = {
.name = "FILTER",
.synopsis = "Filter the string to include only the allowed characters",
- .syntax = "FILTER(<allowed-chars>,<string>)",
+ .syntax = "FILTER(<allowed-chars>|<string>)",
.read = filter,
};
@@ -193,13 +193,13 @@ static int array(struct ast_channel *chan, char *cmd, char *var,
static struct ast_custom_function array_function = {
.name = "ARRAY",
.synopsis = "Allows setting multiple variables at once",
- .syntax = "ARRAY(var1[,var2[...][,varN]])",
+ .syntax = "ARRAY(var1[|var2[...][|varN]])",
.write = array,
.desc =
"The comma-separated list passed as a value to which the function is set will\n"
"be interpreted as a set of values to which the comma-separated list of\n"
"variable names in the argument should be set.\n"
- "Hence, Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2\n"
+ "Hence, Set(ARRAY(var1|var2)=1\\,2) will set var1 to 1 and var2 to 2\n"
"Note: remember to either backslash your commas in extensions.conf or quote the\n"
"entire argument, since Set can take multiple arguments itself.\n",
};
@@ -339,7 +339,7 @@ sprintf_fail:
static struct ast_custom_function sprintf_function = {
.name = "SPRINTF",
.synopsis = "Format a variable according to a format string",
- .syntax = "SPRINTF(<format>,<arg1>[,...<argN>])",
+ .syntax = "SPRINTF(<format>|<arg1>[|...<argN>])",
.read = acf_sprintf,
.desc =
"Parses the format string specified and returns a string matching that format.\n"
@@ -435,7 +435,7 @@ static int acf_strftime(struct ast_channel *chan, char *cmd, char *parse,
static struct ast_custom_function strftime_function = {
.name = "STRFTIME",
.synopsis = "Returns the current date/time in a specified format.",
- .syntax = "STRFTIME([<epoch>][,[timezone][,format]])",
+ .syntax = "STRFTIME([<epoch>][|[timezone][|format]])",
.read = acf_strftime,
};