rc-js-util
Version:
A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.
106 lines (49 loc) • 1.21 kB
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [rc-js-util](./rc-js-util.md) > [arrayCopyInto](./rc-js-util.arraycopyinto.md)
## arrayCopyInto() function
Make an array contain the same items as another.
**Signature:**
```typescript
export declare function arrayCopyInto<TItem>(from: ArrayLike<TItem>, to: TItem[], startIndex?: number, length?: number): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
from
</td><td>
ArrayLike<TItem>
</td><td>
The array to copy from.
</td></tr>
<tr><td>
to
</td><td>
TItem\[\]
</td><td>
The array to copy into and resize.
</td></tr>
<tr><td>
startIndex
</td><td>
number
</td><td>
_(Optional)_ The index to start with in the from array.
</td></tr>
<tr><td>
length
</td><td>
number
</td><td>
_(Optional)_ The index to end with in the from array.
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
See [arrayCopyInto()](./rc-js-util.arraycopyinto.md)<!-- -->.