Got a question that the wiki doesn't answer? Ask on the forum (preferred), or join us on IRC.

BeastNode

CommandHelper/Staged/API/array normalize

From EngineHub.org Wiki
Jump to: navigation, search



Vital Info

Name array_normalize
Returns array
Usages array
Throws CastException
Since 3.3.0
Restricted
No
Optimizations NO_SIDE_EFFECTS

Description

Returns a new normal array, given an associative array. (If the array passed in is not associative, a copy of the array is returned).

Usages

array_normalize(array)

Examples (How do these work?)

Example 1

Basic usage

Given the following code:

1   array_normalize(array(one: 'a', two: 'b', three: 'c'))


The output would be:

:{a, c, b}

Example 2

Usage with normal array

Given the following code:

1   array_normalize(array(1, 2, 3))


The output would be:

:{1, 2, 3}





Navigation menu