Skip to main content
Version: 15.x (API 15) [Current]

Class ReadOnlySpanExtensions

Extension methods for System.ReadOnlySpan1`.

Assembly: Dalamud.dll​
Declaration
public static class ReadOnlySpanExtensions

Methods​

BeforeNull<T>(ReadOnlySpan<T>)​

Returns a slice of the span containing all elements up to, but not including, the first occurrence of the default value for <code class="typeparamref">T</code>.

Declaration
public static ReadOnlySpan<T> BeforeNull<T>(this ReadOnlySpan<T> span) where T : unmanaged, IEquatable<T>
Returns​

System.ReadOnlySpan<<T>>: A System.ReadOnlySpan1ending before the first occurrence ofdefault(T)`; otherwise, the original <code class="paramref">span</code> if no default value is found.

Parameters​
TypeNameDescription
System.ReadOnlySpan<<T>>spanThe target read-only span to slice.
Type Parameters​
NameDescription
TThe unmanaged type of elements in the span, which must implement .