Skip to content

Commit

Permalink
Update ValueMatch.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Feb 20, 2024
1 parent 7118eee commit 6676058
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Polyfill/Regex/ValueMatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,26 @@ namespace System.Text.RegularExpressions;
#endif
readonly ref struct ValueMatch
{
private readonly int _index;
private readonly int _length;

/// <summary>
/// Crates an instance of the <see cref="ValueMatch"/> type based on the passed in <paramref name="index"/> and <paramref name="length"/>.
/// </summary>
/// <param name="index">The position in the original span where the first character of the captured sliced span is found.</param>
/// <param name="length">The length of the captured sliced span.</param>
internal ValueMatch(int index, int length)
{
_index = index;
_length = length;
Index = index;
Length = length;
}

/// <summary>
/// Gets the position in the original span where the first character of the captured sliced span is found.
/// </summary>
public int Index => _index;
public int Index { get; }

/// <summary>
/// Gets the length of the captured sliced span.
/// </summary>
public int Length => _length;
public int Length { get; }
}

#endif

0 comments on commit 6676058

Please sign in to comment.