Creates a new Span<T> of length 1 around the specified reference.
Creates a new Span<T> object over the entirety of a specified array.
Creates a new Span<T> object that includes a specified number of elements of an array starting at a specified index.
Creates a new Span<T> object from a specified number of T
elements starting at a specified memory address.
Returns an empty Span<T> object.
Returns a value that indicates whether the current Span<T> is empty.
Gets the element at the specified zero-based index.
Returns the length of the current span.
Clears the contents of this Span<T> object.
Copies the contents of this Span<T> into a destination Span<T>.
Obsolete.
Obsolete.
Calls to this method are not supported.
Fills the elements of this span with a specified value.
Returns an enumerator for this Span<T>.
Obsolete.
Throws a NotSupportedException.
Returns a reference to an object of type T that can be used for pinning.
This method is intended to support .NET compilers and is not intended to be called by user code.
Forms a slice out of the current span that begins at a specified index.
Forms a slice out of the current span starting at a specified index for a specified length.
Copies the contents of this span into a new array.
Returns the string representation of this Span<T> object.
Attempts to copy the current Span<T> to a destination Span<T> and returns a value that indicates whether the copy operation succeeded.
Returns a value that indicates whether two Span<T> objects are equal.
Defines an implicit conversion of an ArraySegment<T> to a Span<T>.
Defines an implicit conversion of a Span<T> to a ReadOnlySpan<T>.
Defines an implicit conversion of an array to a Span<T>.
Returns a value that indicates whether two Span<T> objects are not equal.
Converts the span to an immutable array.
Searches an entire sorted Span<T> for a value using the specified IComparable<T> generic interface.
Searches an entire sorted Span<T> for a specified value using the specified TComparer
generic type.
Searches an entire sorted Span<T> for a value using the specified TComparable
generic type.
Finds the length of any common prefix shared between span
and other
.
Finds the length of any common prefix shared between span
and other
.
Indicates whether a specified value is found in a span. Values are compared using IEquatable{T}.Equals(T).
Searches for an occurrence of value0
or value1
, and returns true
if found. If not found, returns false
.
Searches for an occurrence of value0
, value1
, or value2
, and returns true
if found. If not found, returns false
.
Searches for an occurrence of any of the specified values
and returns true
if found. If not found, returns false
.
Searches for an occurrence of any of the specified values
and returns true
if found. If not found, returns false
.
Searches for any value other than the specified value
.
Searches for any value other than value0
or value1
.
Searches for any value other than value0
, value1
, or value2
.
Searches for any value other than the specified values
.
Searches for any value other than the specified values
.
Searches for any value outside of the range between lowInclusive
and highInclusive
, inclusive.
Searches for any value in the range between lowInclusive
and highInclusive
, inclusive, and returns true
if found. If not found, returns false
.
Counts the number of times the specified value
occurs in the span
.
Counts the number of times the specified value
occurs in the span
.
Determines whether the specified sequence appears at the end of a span.
Searches for the specified value and returns the index of its first occurrence. Values are compared using IEquatable{T}.Equals(T).
Searches for the specified sequence and returns the index of its first occurrence. Values are compared using IEquatable{T}.Equals(T).
Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator.
Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator.
Searches for the first index of any of the specified values.
Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator.
Searches for the first index of any value other than the specified value
.
Searches for the first index of any value other than the specified value0
or value1
.
Searches for the first index of any value other than the specified value0
, value1
, or value2
.
Searches for the first index of any value other than the specified values
.
Searches for the first index of any value other than the specified values
.
Searches for the first index of any value outside of the range between lowInclusive
and highInclusive
, inclusive.
Searches for the first index of any value in the range between lowInclusive
and highInclusive
, inclusive.
Searches for the specified value and returns the index of its last occurrence. Values are compared using IEquatable{T}.Equals(T).
Searches for the specified sequence and returns the index of its last occurrence. Values are compared using IEquatable{T}.Equals(T).
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.
Searches for the last index of any of the specified values.
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.
Searches for the last index of any value other than the specified value
.
Searches for the last index of any value other than the specified value0
or value1
.
Searches for the last index of any value other than the specified value0
, value1
, or value2
.
Searches for the last index of any value other than the specified values
.
Searches for the last index of any value other than the specified values
.
Searches for the last index of any value outside of the range between lowInclusive
and highInclusive
, inclusive.
Searches for the last index of any value in the range between lowInclusive
and highInclusive
, inclusive.
Determines whether a span and a read-only span overlap in memory.
Determines whether a span and a read-only span overlap in memory and outputs the element offset.
Replaces all occurrences of oldValue
with newValue
.
Reverses the sequence of the elements in the entire span.
Determines the relative order of a span and a read-only span by comparing the elements using IComparable{T}.CompareTo(T).
Determines whether a span and a read-only span are equal by comparing the elements using IEquatable{T}.Equals(T).
Determines whether two sequences are equal by comparing the elements using an IEqualityComparer<T>.
Sorts the elements in the entire Span<T> using the IComparable<T> implementation of each element of the Span<T>.
Sorts the elements in the entire Span<T> using the specified Comparison<T>.
Sorts the elements in the entire Span<T> using the TComparer
.
Sorts a pair of spans (one containing the keys and the other containing the corresponding items) based on the keys in the first Span<T> using the IComparable<T> implementation of each key.
Sorts a pair of spans (one containing the keys and the other containing the corresponding items) based on the keys in the first Span<T> using the specified comparison.
Sorts a pair of spans (one containing the keys and the other containing the corresponding items) based on the keys in the first Span<T> using the specified comparer.
Determines whether a specified sequence appears at the start of a span.
Removes all leading and trailing occurrences of a specified element from a span.
Removes all leading and trailing occurrences of a set of elements specified in a read-only span from a span.
Removes all trailing occurrences of a specified element from a span.
Removes all trailing occurrences of a set of elements specified in a read-only span from a span.
Removes all leading occurrences of a specified element from the span.
Removes all leading occurrences of a set of elements specified in a read-only span from the span.