Artemis.Utilities.Memory.Memory.GetAddressOffsets C# (CSharp) Method

GetAddressOffsets() protected static method

Gets address offsets
protected static GetAddressOffsets ( string address ) : int[]
address string Address
return int[]
        protected static int[] GetAddressOffsets(string address)
        {
            if (string.IsNullOrEmpty(address))
                return new int[0];
            var matches = Regex.Matches(address, OffsetPattern);
            var offsets = new int[matches.Count];
            string value;
            char ch;
            for (var i = 0; i < matches.Count; i++)
            {
                ch = matches[i].Value[0];
                if (ch == '+' || ch == '-')
                    value = matches[i].Value.Substring(1);
                else
                    value = matches[i].Value;
                offsets[i] = Convert.ToInt32(value, 16);
                if (ch == '-')
                    offsets[i] = -offsets[i];
            }
            return offsets;
        }