AmongElementsOfArray

Typeoperator
DictionaryLCB
LibraryLiveCode Builder
Syntax
<Needle> ( is not | is ) among the elements of <Target>
Associationscom.livecode.array
Summary

Determines if an array contains a given element

Parameters
NameTypeDescription
Needle

Any expression.

Target

An expression which evaluates to an array.

Example
variable tArray as Array
put "value" into tArray["key"]

variable tIsAmong as Boolean
put "value" is among the elements of tArray into tIsAmong -- tIsAmong is true
Values
NameTypeDescription
return

Returns true if Needle can be found among the elements of Target.

Description

Elements are compared using the default comparison for that type. Thus for a string, tString, tString is among the elements of tArray is a case sensitive search.

Tagsarrays