Core Function InArray

From Sputnik Wiki
Revision as of 12:58, 29 January 2013 by UberFoX (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
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