Goto main content

isset

This function is used to check if a value is contained in a list with a delimiter between each element.

ISSET

NAME

isset - This function is used to check if a value is contained in a list with a delimiter between each element.

SYNOPSIS

isset(values:"…",list:"…",delimiter:"…") isset("values","list"[,"delimiter"])

DESCRIPTION

This function is used to find a value within a defined set. This value can be made of multiple characters separated by a delimiter. In that case, the function will try to find at least one value within the list.

In the first form, each parameter is named. In the second form, the parameters are positionnal.

By default, the delimiter is a comma, but the user can set it to something different at the beginning. It can be more than one character.

The function returns a zero if the value is not found in the set. When the value is found, it returns the position of the value starting at 1.

PARAMETERS

list
List of values.
value
The value or values that we search for in the list. Values must be separated by a delimiter.
delimiter
The delimiter in the list which is set to comma by default.

RETURN

0 if not found.
position number if found starting at 1.

EXAMPLES

res=4. return res=4.
if isset(list:",bb,ccc,d",values:"d",delimiter:",") then
        "found";
else
        "not";
endif

SEE ALSO

AUTHOR

Written by Pierre Laplante and Caroline Laplante, <laplante@sednove.com>

MODIFICATIONS

1.0 2014-09-09 21:24:14 laplante@sednove.com

Edit

© 2022 extenso Inc. All rights reserved.