mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 18:18:00 +02:00
Corlib helper methods
This commit is contained in:
parent
6eddf12948
commit
74b73e5dc8
5 changed files with 116 additions and 2 deletions
|
@ -15,8 +15,6 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public explicit static operator T[CSize] (Self val)
|
||||
{
|
||||
return val.mVal;
|
||||
|
@ -28,6 +26,44 @@ namespace System
|
|||
return .(&val.mVal, CSize);
|
||||
}
|
||||
|
||||
public void SetAll(T value)
|
||||
{
|
||||
for (int i < CSize)
|
||||
mVal[i] = value;
|
||||
}
|
||||
|
||||
public bool Contains(T value)
|
||||
{
|
||||
for (int i = 0; i < CSize; i++)
|
||||
if (mVal[i] == value)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool ContainsStrict(T value)
|
||||
{
|
||||
for (int i = 0; i < CSize; i++)
|
||||
if (mVal[i] === value)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public int IndexOf(T value)
|
||||
{
|
||||
for (int i = 0; i < CSize; i++)
|
||||
if (mVal[i] == value)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int IndexOfStrict(T value)
|
||||
{
|
||||
for (int i = 0; i < CSize; i++)
|
||||
if (mVal[i] === value)
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public override void ToString(String strBuffer) mut
|
||||
{
|
||||
if (typeof(T) == typeof(char8))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue