pjs.moveArray() moves elements from and/or to an array. If padding is specified, it will clear out the remaining characters and elements in the target after the move is complete.
- From array name
- Target array name
- From array index - 1 or higher, start from this index when working with the source.
- Target array index - 1 or higher, start from this index when working with the target.
- Padding (optional Boolean) - if passed in as true, the target will be padded.
Example 1: array -> array
Example 2: char -> array
Example 3: array -> array (with source index)
In this example, we are moving ARRX into ARRY. Since the second parameter is 3, this means it will start the move from the 3rd element (skipping the first two) which results in only 3 elements being moved.
Example 4: array -> array (with target index)
This example shows a value of 6 on the 2th parameter. Because the 2th parameter indicates where the index is going to start on the target (ARRY), it's going to move elements into this array starting from the 6th element.
Example 5: character const -> flags array
In this example, we're going to move a const ('111111') into flags, starting at element 71. This means elements 71, through to 76 in flags will be set to true. (since 1 is true, 0 would be false)
Example 6: array -> character field