◆ Append()
static int[] BrawlLib.Internal.ArrayExtension.Append |
( |
this Array |
a, |
|
|
int[] |
array |
|
) |
| |
|
inlinestatic |
26 {
27 List<int> values = new List<int>();
28 foreach (int i in a)
29 {
30 values.Add(i);
31 }
32
33 foreach (int i in array)
34 {
35 values.Add(i);
36 }
37
38 return values.ToArray();
39 }
◆ Append< T >()
54 {
55 T[] final = new T[data.Length + appended.Length];
56 data.CopyTo(final, 0);
57 appended.CopyTo(final, data.Length);
58 return final;
59 }
◆ FindAllOccurences()
static int[] BrawlLib.Internal.ArrayExtension.FindAllOccurences |
( |
this Array |
a, |
|
|
object |
o |
|
) |
| |
|
inlinestatic |
9 {
10 List<int> l = new List<int>();
11 int i = 0;
12 foreach (object x in a)
13 {
14 if (x == o)
15 {
16 l.Add(i);
17 }
18
19 i++;
20 }
21
22 return l.ToArray();
23 }
◆ IndexOf()
static int BrawlLib.Internal.ArrayExtension.IndexOf |
( |
this Array |
a, |
|
|
object |
value |
|
) |
| |
|
inlinestatic |
42 {
43 return Array.IndexOf(a, value);
44 }
◆ SubArray< T >()
static T[] BrawlLib.Internal.ArrayExtension.SubArray< T > |
( |
this T[] |
data, |
|
|
int |
index, |
|
|
int |
length |
|
) |
| |
|
inlinestatic |
47 {
48 T[] result = new T[length];
49 Array.Copy(data, index, result, 0, length);
50 return result;
51 }
The documentation for this class was generated from the following file:
- BrawlLib/Internal/ArrayExtension.cs