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
span
ExSpan<T>The span to search.
value0
TOne of the values to search for.
value1
TOne 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
span
ExSpan<T>The span to search.
value0
TOne of the values to search for.
value1
TOne of the values to search for.
value2
TOne 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
span
ExSpan<T>The span to search.
values
ReadOnlyExSpan<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
span
ReadOnlyExSpan<T>The span to search.
value0
TOne of the values to search for.
value1
TOne 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
span
ReadOnlyExSpan<T>The span to search.
value0
TOne of the values to search for.
value1
TOne of the values to search for.
comparer
IEqualityComparer<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
span
ReadOnlyExSpan<T>The span to search.
value0
TOne of the values to search for.
value1
TOne of the values to search for.
value2
TOne 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
span
ReadOnlyExSpan<T>The span to search.
value0
TOne of the values to search for.
value1
TOne of the values to search for.
value2
TOne of the values to search for.
comparer
IEqualityComparer<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
span
ReadOnlyExSpan<T>The span to search.
values
ReadOnlyExSpan<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
span
ReadOnlyExSpan<T>The span to search.
values
ReadOnlyExSpan<T>The set of values to search for.
comparer
IEqualityComparer<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