src/AnvilPacker/Util/Collections/BitSet.cs
/// <summary> Returns the index of the next bit set to <paramref name="value"/> after <paramref name="offset"/> (inclusive). </summary>
Returns the index of the next bit set to  after  (inclusive).
Returns the index of the next bit set to after ( inclusive ) .
public int NextIndex(bool value, int offset)
        {
            if ((uint)offset >= (uint)Length) {
                return -1;
            }
            int i = offset >> 6;
            ulong m = ~Broadcast(value);
            ulong w = (_vals[i] ^ m) & (WORD_ALL << offset);
            while (true) {
                if (w != 0) {
                    int pos = i * 64 + BitOperations.TrailingZeroCount(w);
                    return pos < Length ? pos : -1;
                }
                if (++i >= _vals.Length) break;
                w = _vals[i] ^ m;
            }
            return -1;
        }
public int NextIndex ( bool value , int offset ) { if ( ( uint ) offset >= ( uint ) Length ) { return - 1 ; } int i = offset >> 6 ; ulong m = ~ Broadcast ( value ) ; ulong w = ( _vals [ i ] ^ m ) & ( WORD_ALL << offset ) ; while ( true ) { if ( w != 0 ) { int pos = i * 64 + BitOperations . TrailingZeroCount ( w ) ; return pos < Length ? pos : - 1 ; } if ( ++ i >= _vals . Length ) break ; w = _vals [ i ] ^ m ; } return - 1 ; }
Returns the index of the next bit set to  after  (inclusive).
Returns the index of the next bit set to after ( inclusive ) .
value
bool
offset
int