Pchp.Library.CharMap.RemoveRange C# (CSharp) Method

RemoveRange() public method

Removes a range of characters from the set.
or are not mapped by this instance. The is less than the .
public RemoveRange ( char first, char last ) : void
first char The lower bound of the range.
last char The upper bound of the range.
return void
        public void RemoveRange(char first, char last)
        {
            if (first > last)
                //throw new ArgumentException(CoreResources.GetString("last_is_less_than_first"));
                throw new ArgumentException();

            int modf = first & 0x1f;
            int modl = last & 0x1f;
            int f = first >> 5;
            int l = last >> 5;

            if (l == f)
            {
                flags[f] &= ~((0xffffffffU >> (31 - modl + modf)) << (31 - modl));
            }
            else
            {
                // the first block:
                flags[f] &= ~(0xffffffffU >> modf);

                // the middle blocks (if any):
                Array.Clear(flags, f + 1, l - f - 1);

                // the last block:
                if (modl < 31)
                    flags[l] &= 0xffffffffU >> (modl + 1);
                else
                    flags[l] = 0U;
            }
        }