Core API Reference: Array

From Color Infection Wiki

Jump to: navigation, search


Contents

= (Assign Array)

Assign an array value

Input Parameters:

Source Array
the soure

Output Parameters:

Target Array
the target
=? (Condition Assign String)

Assign an array by the result of a condition.

Input Parameters:

Condition Result
the condition result
Source Array 1
if the condition result is true, this value will be used.
Source Array 2
if the condition result is false, this value will be used.

Output Parameters:

Target Array
the target
Swap Array Values

Swap two array values.

Input Parameters:

Array 1
one array value
Array 2
another array value

Output Parameters:

(none)
Array 1 == Array 2?

Whether or not two arrays are the same one array. Notice: this API is NOT for checking whether of not two arrays contains same elements.

Input Parameters:

Array 1
one array
Array 2
another array

Output Parameters:

Result
the result
Array To String

Convert an array to a string

Input Parameters:

Array
the input array

Output Parameters:

Result
the result string
Create Array

Create an array

Input Parameters:

Initial Length
initial number of elements

Output Parameters:

Created Array
the created array. Notice: all initial element values are null.
Is a Null Array

Whether or not an array is null.

Input Parameters:

The Array
the input array

Output Parameters:

Is Null
true for the input array is null
Get Array Length

Get the length of an array

Input Parameters:

The Array
the input array

Output Parameters:

Array Length
the length of the input array
Set Array Length

Get the length of an array

Input Parameters:

The Array
the input array
Array Length
the new length to set. If the value is larger than the old length, null values will be appended; if the value is smaller than the old length, the array will be truncated.

Output Parameters:

(none)
Remove Elements

Remove some elements from a specified index

Input Parameters:

The Array
the input array
From Index
from which index to remove
Number Elements
how many elements to remove

Output Parameters:

(none)
Insert Elements

Remove some undefined elements at the specified index.

Input Parameters:

The Array
the input array
Index
at which index to insert
Number Elements
how many elements to insert

Output Parameters:

(none)
Concat Arrays

Merge two arrays into a new array

Input Parameters:

Array 1
the input array 1
Array 2
the input array 2

Output Parameters:

Result Array
the result merged array. If both the 2 input arrays are null, then the result is null.
Set Element With [Type]

Replace array element value at the specified index.

Input Parameters:

The Array
the input array
Element Index
which element will be replaced.
Element Value
the value to be set at the specified index

Output Parameters:

(none)
Get Element As [Type]

Get array element value at the specified index.

Input Parameters:

The Array
the input array
Element Index
which element will be retrieved.

Output Parameters:

Element Value
the value of the element at the specified index
Personal tools