Version: Unity 6.7 Beta (6000.7)
LanguageEnglish
  • C#

UnsafeBitArray.ReadOnly.Find

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public int Find(int pos, int numBits);

Parameters

Parameter Description
pos Index of the bit at which to start searching.
numBits Number of contiguous 0 bits to look for.

Returns

int The index of the first occurrence in this array of numBits contiguous 0 bits. Range is pos up to (but not including) the length of this array. Returns int.MaxValue if no occurrence is found.

Description

Returns the index of the first occurrence in this array of "N" contiguous 0 bits.

The search is linear.


Declaration

public int Find(int pos, int count, int numBits);

Parameters

Parameter Description
pos Index of the bit at which to start searching.
numBits Number of contiguous 0 bits to look for.
count Number of indexes to consider as the return value.

Returns

int The index of the first occurrence in this array of numBits contiguous 0 bits. Range is pos up to (but not including) pos + count. Returns int.MaxValue if no occurrence is found.

Description

Returns the index of the first occurrence in this array of a given number of contiguous 0 bits.

The search is linear.