MemoryExtensionsSplitAtT(ReadOnlySpanT, Int32, Int32) Method
Splits a
ReadOnlySpanT into two parts at the specified index, optionally
skipping the specified number of elements.
Namespace: Ookii.CommonAssembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
public static ReadOnlySpanPair<T, T> SplitAt<T>(
this ReadOnlySpan<T> span,
int index,
int skip = 0
)
<ExtensionAttribute>
Public Shared Function SplitAt(Of T) (
span As ReadOnlySpan(Of T),
index As Integer,
Optional skip As Integer = 0
) As ReadOnlySpanPair(Of T, T)
Dim span As ReadOnlySpan(Of T)
Dim index As Integer
Dim skip As Integer
Dim returnValue As ReadOnlySpanPair(Of T, T)
returnValue = span.SplitAt(index,
skip)
public:
[ExtensionAttribute]
generic<typename T>
static ReadOnlySpanPair<T, T> SplitAt(
ReadOnlySpan<T> span,
int index,
int skip = 0
)
- span ReadOnlySpanT
- The span to split.
- index Int32
- The index to split at.
- skip Int32 (Optional)
- The number of elements to skip at the split point.
- T
- The type of the items in the ReadOnlySpanT.
ReadOnlySpanPairT,
T
A pair containing the parts before and after the split point.
In Visual Basic and C#, you can call this method as an instance method on any object of type
ReadOnlySpanT. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).