Core Function InArray

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> InArray( <array>, <needle>, <strict>, <flag> ) </pre> === Description === Checks if a value exists in an array === Parameters === ==== array ==== The array to use. ==...")
Newer edit →

Revision as of 12:58, 29 January 2013

InArray( <array>, <needle>, <strict>, <flag> )

Contents

Description

Checks if a value exists in an array

Parameters

array

The array to use.

needle

The searched value.

Note:

If needle is a string, the comparison is done in a case-sensitive manner.

(Unless the flag is set to ignore case)

strict

Optional; If true the the array value and the needle must be same TYPE such as both Int32s.

flag

Optional; Change how the InArray works

1 = Ignore case on string checks

2 = Use recursion

You can add them together for example:

1 | 2

Default: 0

Return Value

Success: Returns 1.

Failure: Returns -1.

Remarks

None.

Example

 
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox