mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
20 lines
330 B
C#
20 lines
330 B
C#
namespace AssetRipper.SourceGenerated.Extensions
|
|
{
|
|
public static class IEnumerableExtensions
|
|
{
|
|
public static int IndexOf<T>(this IEnumerable<T> _this, Func<T, bool> predicate)
|
|
{
|
|
int index = 0;
|
|
foreach (T t in _this)
|
|
{
|
|
if (predicate(t))
|
|
{
|
|
return index;
|
|
}
|
|
index++;
|
|
}
|
|
return -1;
|
|
}
|
|
}
|
|
}
|