Core Function IsKeysSet

From Sputnik Wiki
Jump to: navigation, search
IsKeysSet( <array>, <keys>, <flag> )

Contents

Description

Check if any/all/none of a given key from a key array was found inside an array.

Parameters

array

The array to use.

keys

The Keys to check for (as an array).

flag

The type of search to do

0 = Require every key in the keys be found in the array
1 = Require at least one key in the keys be found in the array
2 = Require at not one key in the keys be found in the array

Return Value

Success - Returns 1.

Failure - Returns 0.

Remarks

None.

Example

my $array = array( "Cat" => "Meow", "Dog" => "Meow" );
say IsKeysSet($array, array("Cat", "Dog"));
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox