BrawlCrate v0.41
Wii File Editor
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
BrawlLib.Internal.ArrayExtension Class Reference

Static Public Member Functions

static int[] FindAllOccurences (this Array a, object o)
 
static int[] Append (this Array a, int[] array)
 
static int IndexOf (this Array a, object value)
 
static T[] SubArray< T > (this T[] data, int index, int length)
 
static T[] Append< T > (this T[] data, T[] appended)
 

Member Function Documentation

◆ 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 >()

static T[] BrawlLib.Internal.ArrayExtension.Append< T > ( this T[]  data,
T[]  appended 
)
inlinestatic
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: