Nintenlord.ROMHacking.AbstractROM.SearchForValue C# (CSharp) Method

SearchForValue() public method

public SearchForValue ( byte value, int offset, int area ) : int[]
value byte
offset int
area int
return int[]
        public int[] SearchForValue(byte[] value, int offset, int area)
        {
            List<int> offsets = new List<int>();
            int index = offset;
            int maxIndex = area + offset;
            while (index < maxIndex)
            {
                int foundIndex = 0;
                while (index + foundIndex < ROMdata.Length
                    && foundIndex < value.Length
                    && ROMdata[index + foundIndex] == value[foundIndex])
                {
                    foundIndex++;
                }
                if (foundIndex == value.Length)
                    offsets.Add(index);

                index++;
            }
            return offsets.ToArray();
        }

Same methods

AbstractROM::SearchForValue ( byte value ) : int[]
AbstractROM::SearchForValue ( int value ) : int[]
AbstractROM::SearchForValue ( int value, int offset, int area ) : int[]
AbstractROM::SearchForValue ( short value ) : int[]
AbstractROM::SearchForValue ( short value, int offset, int area ) : int[]