MemoryExtensionsSplitAtT(ReadOnlyMemoryT, Int32, Int32) Method
Splits a
ReadOnlyMemoryT 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 (ReadOnlyMemory<T> , ReadOnlyMemory<T> ) SplitAt<T>(
this ReadOnlyMemory<T> span,
int index,
int skip = 0
)
<ExtensionAttribute>
Public Shared Function SplitAt(Of T) (
span As ReadOnlyMemory(Of T),
index As Integer,
Optional skip As Integer = 0
) As ( As ReadOnlyMemory(Of T), As ReadOnlyMemory(Of T))
Dim span As ReadOnlyMemory(Of T)
Dim index As Integer
Dim skip As Integer
Dim returnValue As ( As ReadOnlyMemory(Of T), As ReadOnlyMemory(Of T))
returnValue = span.SplitAt(index,
skip)
public:
[ExtensionAttribute]
generic<typename T>
static ValueTuple<ReadOnlyMemory<T>, ReadOnlyMemory<T>> SplitAt(
ReadOnlyMemory<T> span,
int index,
int skip = 0
)
- span ReadOnlyMemoryT
- The memory region 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 ReadOnlyMemoryT.
ValueTupleReadOnlyMemoryT,
ReadOnlyMemoryT
A tuple 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
ReadOnlyMemoryT. 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).