Table of Contents

Method IndexOfAny

Namespace
Zyl.ExSpans
Assembly
ExSpans.dll

IndexOfAny<T>(ExSpan<T>, T, T)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<T>(this ExSpan<T> span, T value0, T value1) where T : IEquatable<T>?

Parameters

span ExSpan<T>

The span to search.

value0 T

One of the values to search for.

value1 T

One of the values to search for.

Returns

nint

Type Parameters

T

IndexOfAny<T>(ExSpan<T>, T, T, T)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<T>(this ExSpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>?

Parameters

span ExSpan<T>

The span to search.

value0 T

One of the values to search for.

value1 T

One of the values to search for.

value2 T

One of the values to search for.

Returns

nint

Type Parameters

T

IndexOfAny<T>(ExSpan<T>, ReadOnlyExSpan<T>)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<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

nint

Type Parameters

T

IndexOfAny<T>(ReadOnlyExSpan<T>, T, T)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1) where T : IEquatable<T>?

Parameters

span ReadOnlyExSpan<T>

The span to search.

value0 T

One of the values to search for.

value1 T

One of the values to search for.

Returns

nint

Type Parameters

T

IndexOfAny<T>(ReadOnlyExSpan<T>, T, T, IEqualityComparer<T>?)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1, IEqualityComparer<T>? comparer = null)

Parameters

span ReadOnlyExSpan<T>

The span to search.

value0 T

One of the values to search for.

value1 T

One 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

nint

Type Parameters

T

IndexOfAny<T>(ReadOnlyExSpan<T>, T, T, T)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1, T value2) where T : IEquatable<T>?

Parameters

span ReadOnlyExSpan<T>

The span to search.

value0 T

One of the values to search for.

value1 T

One of the values to search for.

value2 T

One of the values to search for.

Returns

nint

Type Parameters

T

IndexOfAny<T>(ReadOnlyExSpan<T>, T, T, T, IEqualityComparer<T>?)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<T>(this ReadOnlyExSpan<T> span, T value0, T value1, T value2, IEqualityComparer<T>? comparer = null)

Parameters

span ReadOnlyExSpan<T>

The span to search.

value0 T

One of the values to search for.

value1 T

One of the values to search for.

value2 T

One 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

nint

Type Parameters

T

IndexOfAny<T>(ReadOnlyExSpan<T>, ReadOnlyExSpan<T>)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<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

nint

Type Parameters

T

IndexOfAny<T>(ReadOnlyExSpan<T>, ReadOnlyExSpan<T>, IEqualityComparer<T>?)

Searches for the first index of any of the specified values similar to calling IndexOf several times with the logical OR operator. If not found, returns -1.

public static nint IndexOfAny<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

nint

Type Parameters

T