|
|
@ -7,7 +7,7 @@ public static class SpanExtensions |
|
|
|
public static T? GetOrNull<T>(this Span<T> span, int index) |
|
|
|
public static T? GetOrNull<T>(this Span<T> span, int index) |
|
|
|
where T : struct => GetOrNull((ReadOnlySpan<T>)span, index); |
|
|
|
where T : struct => GetOrNull((ReadOnlySpan<T>)span, index); |
|
|
|
public static T? GetOrNull<T>(this ReadOnlySpan<T> span, int index) |
|
|
|
public static T? GetOrNull<T>(this ReadOnlySpan<T> span, int index) |
|
|
|
where T : struct => (index >= 0 && index < span.Length) ? span[index] : null; |
|
|
|
where T : struct => ((index >= 0) && (index < span.Length)) ? span[index] : null; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static ReadOnlySpanSplitEnumerator<T> Split<T>(this ReadOnlySpan<T> span, T splitOn) |
|
|
|
public static ReadOnlySpanSplitEnumerator<T> Split<T>(this ReadOnlySpan<T> span, T splitOn) |
|
|
|