Share via


Match Class

Definition

Represents a range of matches between two sequences as a pair of spans of equal length.

public ref class Match : System::Collections::Generic::IEnumerable<Tuple<int, int> ^>
public class Match : System.Collections.Generic.IEnumerable<Tuple<int,int>>
type Match = class
    interface seq<int * int>
    interface IEnumerable
Public Class Match
Implements IEnumerable(Of Tuple(Of Integer, Integer))
Inheritance
Match
Implements

Remarks

Given two sequences: abCCd (left) abFFd (right) The generated pairs of matches would be: (0, 0), (1, 1), (4, 4) Which would turn into the Matches (left-start, right-start, length): (0, 0, 2) and (4, 4, 1)

Constructors

Name Description
Match(Span, Span)

Creates a match from two spans of equal length.

Properties

Name Description
Left

Get the left-side range

Length

Gets the length of the spans. Both spans have equal lengths.

Right

Gets the right span.

Methods

Name Description
Equals(Object)

Determines whether two Match objects have the same left and right spans.

GetEnumerator()

Gets an enumerator typed as a Tuple of integers.

GetHashCode()

Provides a hash function.

Explicit Interface Implementations

Name Description
IEnumerable.GetEnumerator()

Gets an untyped enumerator.

Extension Methods

Name Description
EmptyIfNull<T>(IEnumerable<T>)

Return this enumeration in case it is not null. In case it is null return empty enumeration.

Applies to