mirror of
https://github.com/kwsch/pkNX.git
synced 2026-04-20 16:47:50 -05:00
15 lines
357 B
C#
15 lines
357 B
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace pkNX.Containers;
|
|
|
|
public static class SpanExtensions
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int IndexOf<T>(this ReadOnlySpan<T> span, T value, int offset)
|
|
where T : IEquatable<T>?
|
|
{
|
|
return offset + span[offset..].IndexOf(value);
|
|
}
|
|
}
|