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

Static Public Member Functions

static int[] FindAllOccurences (this IList a, object o)
 
static int IndexOf (this byte[] searchList, byte[] pattern)
 

Member Function Documentation

◆ FindAllOccurences()

static int[] BrawlLib.Internal.ListExtension.FindAllOccurences ( this IList  a,
object  o 
)
inlinestatic
11 {
12 List<int> l = new List<int>();
13 int i = 0;
14 foreach (object x in a)
15 {
16 if (x == o)
17 {
18 l.Add(i);
19 }
20
21 i++;
22 }
23
24 return l.ToArray();
25 }

◆ IndexOf()

static int BrawlLib.Internal.ListExtension.IndexOf ( this byte[]  searchList,
byte[]  pattern 
)
inlinestatic
40 {
41 Encoding encoding = Encoding.GetEncoding(1252);
42 string s1 = encoding.GetString(searchList, 0, searchList.Length);
43 string s2 = encoding.GetString(pattern, 0, pattern.Length);
44 int result = s1.IndexOf(s2, StringComparison.Ordinal);
45 return result;
46 }

The documentation for this class was generated from the following file: