Method LastIndexOfAny
LastIndexOfAny<T>(ExSpan<T>, T, T)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ExSpan<T> span, T value0, T value1) where T : IEquatable<T>?
Parameters
spanExSpan<T>The span to search.
value0TOne of the values to search for.
value1TOne of the values to search for.
Returns
Type Parameters
T
LastIndexOfAny<T>(ExSpan<T>, T, T, T)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ExSpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>?
Parameters
spanExSpan<T>The span to search.
value0TOne of the values to search for.
value1TOne of the values to search for.
value2TOne of the values to search for.
Returns
Type Parameters
T
LastIndexOfAny<T>(ExSpan<T>, ReadOnlyExSpan<T>)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ExSpan<T> span, ReadOnlyExSpan<T> values) where T : IEquatable<T>?
Parameters
spanExSpan<T>The span to search.
valuesReadOnlyExSpan<T>The set of values to search for.
Returns
Type Parameters
T
LastIndexOfAny<T>(ReadOnlyExSpan<T>, T, T)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1) where T : IEquatable<T>?
Parameters
spanReadOnlyExSpan<T>The span to search.
value0TOne of the values to search for.
value1TOne of the values to search for.
Returns
Type Parameters
T
LastIndexOfAny<T>(ReadOnlyExSpan<T>, T, T, IEqualityComparer<T>?)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1, IEqualityComparer<T>? comparer = null)
Parameters
spanReadOnlyExSpan<T>The span to search.
value0TOne of the values to search for.
value1TOne of the values to search for.
comparerIEqualityComparer<T>The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
Type Parameters
T
LastIndexOfAny<T>(ReadOnlyExSpan<T>, T, T, T)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>?
Parameters
spanReadOnlyExSpan<T>The span to search.
value0TOne of the values to search for.
value1TOne of the values to search for.
value2TOne of the values to search for.
Returns
Type Parameters
T
LastIndexOfAny<T>(ReadOnlyExSpan<T>, T, T, T, IEqualityComparer<T>?)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1, T value2, IEqualityComparer<T>? comparer = null)
Parameters
spanReadOnlyExSpan<T>The span to search.
value0TOne of the values to search for.
value1TOne of the values to search for.
value2TOne of the values to search for.
comparerIEqualityComparer<T>The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
Type Parameters
T
LastIndexOfAny<T>(ReadOnlyExSpan<T>, ReadOnlyExSpan<T>)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ReadOnlyExSpan<T> span, ReadOnlyExSpan<T> values) where T : IEquatable<T>?
Parameters
spanReadOnlyExSpan<T>The span to search.
valuesReadOnlyExSpan<T>The set of values to search for.
Returns
Type Parameters
T
LastIndexOfAny<T>(ReadOnlyExSpan<T>, ReadOnlyExSpan<T>, IEqualityComparer<T>?)
Searches for the last index of any of the specified values similar to calling LastIndexOf several times with the logical OR operator. If not found, returns -1.
public static nint LastIndexOfAny<T>(this ReadOnlyExSpan<T> span, ReadOnlyExSpan<T> values, IEqualityComparer<T>? comparer = null)
Parameters
spanReadOnlyExSpan<T>The span to search.
valuesReadOnlyExSpan<T>The set of values to search for.
comparerIEqualityComparer<T>The IEqualityComparer<T> implementation to use when comparing elements, or null to use the default IEqualityComparer<T> for the type of an element.
Returns
Type Parameters
T