find_in_set

This function is used to check is a value is set within a list with a delimiter between each element.

FIND_IN_SET

NAME

find_in_set - This function is used to check is a value is set within a list with a delimiter between each element.

SYNOPSIS

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

DESCRIPTION

find_in_set and isset are synonyms.

In the first form, each parameter is named while in the second form, the parameters are positional.

The delimiter is set by default to ",". The delimiter can be more than one character.

It returns 0 if the value is not find in the set. When the value is found, the position is returned starting at 1.

PARAMETERS

list
List of values.
values
The value that we searched in the list.
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

if find_in_set(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

© 2024 extenso Inc. All rights reserved.