Struct TextMatch
A single text search match result with position and length.
Implements
Inherited Members
Namespace: DRIT.Pdf.Content
Assembly: DRIT.Pdf.dll
Syntax
public readonly struct TextMatch : IEquatable<TextMatch>
Constructors
TextMatch(int, int, string)
Initializes a text match result.
Declaration
public TextMatch(int startIndex, int length, string text)
Parameters
| Type | Name | Description |
|---|---|---|
| int | startIndex | |
| int | length | |
| string | text |
Properties
Length
Gets the length of the matched text.
Declaration
public int Length { get; }
Property Value
| Type | Description |
|---|---|
| int |
StartIndex
Gets the start index of the match in the page's text.
Declaration
public int StartIndex { get; }
Property Value
| Type | Description |
|---|---|
| int |
Text
Gets the matched text.
Declaration
public string Text { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
Equals(TextMatch)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(TextMatch other)
Parameters
| Type | Name | Description |
|---|---|---|
| TextMatch | other | An object to compare with this object. |
Returns
| Type | Description |
|---|---|
| bool | true if the current object is equal to the |
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj | The object to compare with the current instance. |
Returns
| Type | Description |
|---|---|
| bool | true if |
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | A 32-bit signed integer that is the hash code for this instance. |
Overrides
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The fully qualified type name. |
Overrides
Operators
operator ==(TextMatch, TextMatch)
Equality operator.
Declaration
public static bool operator ==(TextMatch a, TextMatch b)
Parameters
| Type | Name | Description |
|---|---|---|
| TextMatch | a | |
| TextMatch | b |
Returns
| Type | Description |
|---|---|
| bool |
operator !=(TextMatch, TextMatch)
Inequality operator.
Declaration
public static bool operator !=(TextMatch a, TextMatch b)
Parameters
| Type | Name | Description |
|---|---|---|
| TextMatch | a | |
| TextMatch | b |
Returns
| Type | Description |
|---|---|
| bool |