1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-21 01:18:02 +02:00

Added concept of strict equality

This commit is contained in:
Brian Fiete 2020-06-17 05:13:53 -07:00
parent 308605a7dd
commit abeda6909b
13 changed files with 249 additions and 79 deletions

View file

@ -147,6 +147,22 @@ namespace System
mLength = 0;
}
public int IndexOf(T item)
{
for (int i = 0; i < mLength; i++)
if (mPtr[i] == item)
return i;
return -1;
}
public int IndexOfStrict(T item)
{
for (int i = 0; i < mLength; i++)
if (mPtr[i] === item)
return i;
return -1;
}
public void RemoveFromStart(int length) mut
{
Debug.Assert((uint)length <= (uint)mLength);