SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST

# StringSearch:NoMatch

### Import List

        Object
        Object
        RT0
        StringSearch

Class List
Factory | This class implements a matcher that always returns the result " no match".
Matcher |

Class Summary: Factory [Detail]
      +---RT0.Object
           |
           +---Object.Object
                |
                +---StringSearch.Factory
                     |
                     +--StringSearch:NoMatch.Factory
This class implements a matcher that always returns the result " no match".
Method Summary
Compile(String8, Flags): Matcher Compile a expression, for example a regular expression pattern, into a Matcher expression object.
Inherited Methods
From RT0.Object: Finalize From Object.Object: Equals, HashCode, ToString From StringSearch.Factory: Compile, Destroy

Class Summary: Matcher [Detail]
      +---RT0.Object
           |
           +---Object.Object
                |
                +---StringSearch.Matcher
                     |
                     +--StringSearch:NoMatch.Matcher
Inherited Fields
From StringSearch.Matcher: flags, groups, pattern
Method Summary
Match(String8, LONGINT, LONGINT): MatchObject Like Matcher.MatchChars, but works on an instance of Object.String8.
MatchChars(ARRAY OF CHAR, LONGINT, LONGINT): MatchObject Returns a corresponding MatchObject instance, if zero or more characters at the beginning of string match this Matcher.
Search(String8, LONGINT, LONGINT): MatchObject Like Matcher.SearchChars, but works on an instance of Object.String8.
SearchChars(ARRAY OF CHAR, LONGINT, LONGINT): MatchObject Scans through string looking for a location where this Matcher produces a match, and return a corresponding MatchObject instance.
Inherited Methods
From RT0.Object: Finalize From Object.Object: Equals, HashCode, ToString From StringSearch.Matcher: Destroy, Match, MatchChars, Search, SearchChars

Variable Summary
factory-: Factory
matcher-: Matcher

Class Detail: Factory

Method Detail

### Compile

    PROCEDURE (f: Factory) Compile(pattern: String8;
                      flags: Flags): Matcher

> Compile a expression, for example a regular expression pattern, into a Matcher expression object. The matcher object can be used for matching using its Matcher.MatchChars and Matcher.SearchChars methods.

> The pattern's behaviour can be modified by specifying a flags value. The set can include of the following variables: ignoreCase, copyString.

> Result is NIL if the given pattern is invalid.

> Pre-condition: The value of pattern does not contain the character 0X.

> [Description inherited from Compile]

> Redefines: Compile

Class Detail: Matcher

Method Detail

### Match

    PROCEDURE (matcher: Matcher) Match(string: String8;
                    pos: LONGINT;
                    endpos: LONGINT): MatchObject

> Like Matcher.MatchChars, but works on an instance of Object.String8.

> [Description inherited from Match]

> Redefines: Match

### MatchChars

    PROCEDURE (matcher: Matcher) MatchChars(string: ARRAY OF CHAR;
                         pos: LONGINT;
                         endpos: LONGINT): MatchObject

> Returns a corresponding MatchObject instance, if zero or more characters at the beginning of string match this Matcher. Returns NIL if the string does not match the pattern. Note that this is different from a zero-length match.

> Note: If you want to locate a match anywhere in string, use Matcher.Search instead.

> The second parameter pos gives an index in the string where the search is to start, for example 0 to start at the beginning of the string.

> The parameter endpos limits how far the string will be searched. It will be as if the string is endpos characters long, so only the characters in ``[pos, endpos[`' will be searched for a match. A value of ``-1`' is equivalent to an endpos of ``Length(string)`'.

> Pre-condition: The start position is within the string ``0 <= pos <= Length(string)`', and the given end position is either ``-1`', or between the start position and the end of the string ``pos <= endpos <= Length(string)`'.

> [Description inherited from MatchChars]

> Redefines: MatchChars

### Search

    PROCEDURE (matcher: Matcher) Search(string: String8;
                     pos: LONGINT;
                     endpos: LONGINT): MatchObject

> Like Matcher.SearchChars, but works on an instance of Object.String8.

> [Description inherited from Search]

> Redefines: Search

### SearchChars

    PROCEDURE (matcher: Matcher) SearchChars(string: ARRAY OF CHAR;
                          pos: LONGINT;
                          endpos: LONGINT): MatchObject

> Scans through string looking for a location where this Matcher produces a match, and return a corresponding MatchObject instance. Returns NIL if no position in the string matches the pattern. Note that this is different from finding a zero-length match at some point in the string.

> The pos and endpos parameters have the same meaning as for the Matcher.MatchChars method.

> [Description inherited from SearchChars]

> Redefines: SearchChars

Variable Detail

### factory

    VAR factory-: Factory

### matcher

    VAR matcher-: Matcher