forked from processing/processing-web-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharrayCopy.xml
More file actions
76 lines (56 loc) · 2.22 KB
/
Copy patharrayCopy.xml
File metadata and controls
76 lines (56 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<root>
<name>arrayCopy()</name>
<category>Data</category>
<subcategory>Array Functions</subcategory>
<usage>Web & Application</usage>
<example>
<image></image>
<code><![CDATA[
String[] north = { "OH", "IN", "MI"};
String[] south = { "GA", "FL", "NC"};
arrayCopy(north, south);
print(south); // Prints OH, IN, MI
]]></code>
</example>
<example>
<image></image>
<code><![CDATA[
String[] north = { "OH", "IN", "MI"};
String[] south = { "GA", "FL", "NC"};
arrayCopy(north, 1, south, 0, 2);
println(south); // Prints IN, MI, NC
]]></code>
</example>
<description><![CDATA[Copies an array (or part of an array) to another array. The <b>src</b> array is copied to the <b>dst</b> array, beginning at the position specified by <b>srcPos</b> and into the position specified by <b>dstPos</b>. The number of elements to copy is determined by <b>length</b>. The simplified version with two arguments copies an entire array to another of the same size. It is equivalent to "arrayCopy(src, 0, dst, 0, src.length)". This function is far more efficient for copying array data than iterating through a <b>for</b> and copying each element.]]></description>
<syntax><![CDATA[
arrayCopy(<kbd>src</kbd>, <kbd>dest</kbd>)
arrayCopy(<kbd>src</kbd>, <kbd>dest</kbd>, <kbd>length</kbd>)
arrayCopy(<kbd>src</kbd>, <kbd>srcPos</kbd>, <kbd>dest</kbd>, <kbd>destPos</kbd>, <kbd>length</kbd>)
]]></syntax>
<parameter>
<label>src</label>
<description><![CDATA[an array of any data type: the source array]]></description>
</parameter>
<parameter>
<label>dest</label>
<description><![CDATA[an array of any data type (as long as it's the same as src): the destination array]]></description>
</parameter>
<parameter>
<label>srcPos</label>
<description><![CDATA[int: starting position in the source array]]></description>
</parameter>
<parameter>
<label>destPos</label>
<description><![CDATA[int: starting position in the destination array]]></description>
</parameter>
<parameter>
<label>length</label>
<description><![CDATA[int: number of array elements to be copied]]></description>
</parameter>
<returns>None</returns>
<related></related>
<availability>1.0</availability>
<type>Function</type>
<partof>Core</partof>
</root>