C# Class System.Text.RegularExpressions.RegexBoyerMoore

显示文件 Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
Dump ( string indent ) : string
ToString ( ) : string

Used when dumping for debugging.

Private Methods

Method Description
IsMatch ( string text, int index, int beglimit, int endlimit ) : bool

When a regex is anchored, we can do a quick IsMatch test instead of a Scan

MatchPattern ( string text, int index ) : bool
RegexBoyerMoore ( string pattern, bool caseInsensitive, bool rightToLeft, CultureInfo culture ) : System.Diagnostics

Constructs a Boyer-Moore state machine for searching for the string pattern. The string must not be zero-length.

Scan ( string text, int index, int beglimit, int endlimit ) : int

Scan uses the Boyer-Moore algorithm to find the first occurrence of the specified string within text, beginning at index, and constrained within beglimit and endlimit. The direction and case-sensitivity of the match is determined by the arguments to the RegexBoyerMoore constructor.

Method Details

Dump() public method

public Dump ( string indent ) : string
indent string
return string

ToString() public method

Used when dumping for debugging.
public ToString ( ) : string
return string