Synopsis
Count the fields, with an arbitrary delimiter
Description
FIELDQTY(<varname>,<delim>)
at least on asterisk 1.4.21.2 the parameters must be separated by “|” and not “,”
Notes
- *CLI> show function FIELDQTY
Return value
Returns the resulting count.
Examples
exten => s,1,Set(foo=${FIELDQTY(bigvar,#)})
exten => 123,1,Set(Var=hello#you#there#on#the#telephone)
exten => 123,n,Set(Count=${FIELDQTY(Var|#)}) ; Count ist 6
See also
- Asterisk func cut: Slices and dices a value into pieces/words
- Asterisk func POP: Removes and returns the last item off of a variable containing delimited text
- Asterisk func SHIFT: Removes and returns the first item off of a variable containing delimited text
- Asterisk func LISTFILTER as introduced with Asterisk 1.6.2: Remove elements from a set list (by name)
- Asterisk func array
- Asterisk variables
- Asterisk functions