Span Struct (System) (original) (raw)
Returns an empty Span object.
Returns a value that indicates whether the current Span is empty.
Gets the element at the specified zero-based index.
Returns the length of the current span.
Converts the span to an immutable array.
BinarySearch(Span, IComparable)
Searches an entire sorted Span for a value using the specified IComparable generic interface.
BinarySearch<T,TComparer>(Span, T, TComparer)
Searches an entire sorted Span for a specified value using the specified TComparer
generic type.
BinarySearch<T,TComparable>(Span, TComparable)
Searches an entire sorted Span for a value using the specified TComparable
generic type.
CommonPrefixLength(Span, ReadOnlySpan, IEqualityComparer)
Finds the length of any common prefix shared between span
and other
.
CommonPrefixLength(Span, ReadOnlySpan)
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
, value1
, or value2
, and returns true
if found. If not found, returns false
.
Searches for an occurrence of value0
or value1
, and returns true
if found. If not found, returns false
.
ContainsAny(Span, SearchValues)
Searches for an occurrence of any of the specified values
and returns true
if found. If not found, returns false
.
ContainsAny(Span, ReadOnlySpan)
Searches for an occurrence of any of the specified values
and returns true
if found. If not found, returns false
.
ContainsAnyExcept(Span, T, T, T)
Searches for any value other than value0
, value1
, or value2
.
Searches for any value other than value0
or value1
.
Searches for any value other than the specified value
.
ContainsAnyExcept(Span, SearchValues)
Searches for any value other than the specified values
.
ContainsAnyExcept(Span, ReadOnlySpan)
Searches for any value other than the specified values
.
ContainsAnyExceptInRange(Span, T, T)
Searches for any value outside of the range between lowInclusive
and highInclusive
, inclusive.
ContainsAnyInRange(Span, T, T)
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.
IndexOfAny(Span, SearchValues)
Searches for the first index of any of the specified values.
IndexOfAny(Span, ReadOnlySpan)
Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator.
IndexOfAnyExcept(Span, T, T, T)
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 value0
or value1
.
Searches for the first index of any value other than the specified value
.
IndexOfAnyExcept(Span, SearchValues)
Searches for the first index of any value other than the specified values
.
IndexOfAnyExcept(Span, ReadOnlySpan)
Searches for the first index of any value other than the specified values
.
IndexOfAnyExceptInRange(Span, T, T)
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).
LastIndexOf(Span, ReadOnlySpan)
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.
LastIndexOfAny(Span, SearchValues)
Searches for the last index of any of the specified values.
LastIndexOfAny(Span, ReadOnlySpan)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator.
LastIndexOfAnyExcept(Span, T, T, T)
Searches for the last index of any value other than the specified value0
, value1
, or value2
.
LastIndexOfAnyExcept(Span, T, T)
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 value
.
LastIndexOfAnyExcept(Span, SearchValues)
Searches for the last index of any value other than the specified values
.
LastIndexOfAnyExcept(Span, ReadOnlySpan)
Searches for the last index of any value other than the specified values
.
LastIndexOfAnyExceptInRange(Span, T, T)
Searches for the last index of any value outside of the range between lowInclusive
and highInclusive
, inclusive.
LastIndexOfAnyInRange(Span, T, T)
Searches for the last index of any value in the range between lowInclusive
and highInclusive
, inclusive.
Overlaps(Span, ReadOnlySpan, Int32)
Determines whether a span and a read-only span overlap in memory and outputs the element offset.
Determines whether a span and a read-only span overlap in memory.
Replace(Span, T, T, IEqualityComparer)
Replaces all occurrences of oldValue
with newValue
.
ReplaceAny(Span, SearchValues, T)
ReplaceAnyExcept(Span, SearchValues, T)
Reverses the sequence of the elements in the entire span.
SequenceCompareTo(Span, ReadOnlySpan)
Determines the relative order of a span and a read-only span by comparing the elements using IComparable{T}.CompareTo(T).
SequenceEqual(Span, ReadOnlySpan, IEqualityComparer)
Determines whether two sequences are equal by comparing the elements using an IEqualityComparer.
SequenceEqual(Span, ReadOnlySpan)
Determines whether a span and a read-only span are equal by comparing the elements using IEquatable{T}.Equals(T).
Sorts the elements in the entire Span using the specified Comparison.
Sorts the elements in the entire Span using the IComparable implementation of each element of the Span.
Sort<T,TComparer>(Span, TComparer)
Sorts the elements in the entire Span using the TComparer
.
Sort<TKey,TValue>(Span, Span, 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 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 using the IComparable implementation of each key.
Sort<TKey,TValue,TComparer>(Span, Span, 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 using the specified comparer.
StartsWith(Span, ReadOnlySpan)
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.