MemoryExtensionsStripPrefixT(ReadOnlySpanT, ReadOnlySpanT) Method
Namespace: Ookii.CommonAssembly: Ookii.Common (in Ookii.Common.dll) Version: 1.0.0+7c2900b8a16cd8ae46bdd79d8f105034712c5fa3
public static NullableReadOnlySpan<T> StripPrefix<T>(
this ReadOnlySpan<T> span,
ReadOnlySpan<T> prefix
)
where T : Object, IEquatable<T>
<ExtensionAttribute>
Public Shared Function StripPrefix(Of T As {Object, IEquatable(Of T)}) (
span As ReadOnlySpan(Of T),
prefix As ReadOnlySpan(Of T)
) As NullableReadOnlySpan(Of T)
Dim span As ReadOnlySpan(Of T)
Dim prefix As ReadOnlySpan(Of T)
Dim returnValue As NullableReadOnlySpan(Of T)
returnValue = span.StripPrefix(prefix)
public:
[ExtensionAttribute]
generic<typename T>
where T : Object, IEquatable<T>
static NullableReadOnlySpan<T> StripPrefix(
ReadOnlySpan<T> span,
ReadOnlySpan<T> prefix
)
- span ReadOnlySpanT
- The ReadOnlySpanT to remove the prefix from.
- prefix ReadOnlySpanT
- The prefix to move.
- T
- The type of the items in the ReadOnlySpanT.
NullableReadOnlySpanT
If
span starts with
prefix, returns the span without
the prefix; otherwise, returns an empty
NullableReadOnlySpanT.
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).