SUMMARY: MODULE | CLASS | TYPE | PROC | VAR | CONST | DETAIL: TYPE | PROC | VAR | CONST |
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: From Object.Object: From StringSearch.Factory: |
Class Summary: Matcher [Detail] | |
+---RT0.Object | +---Object.Object | +---StringSearch.Matcher | +--StringSearch:NoMatch.Matcher | |
Inherited Fields | |
From StringSearch.Matcher: | |
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: From Object.Object: From StringSearch.Matcher: |
Variable Summary | |
factory-: Factory | |
matcher-: Matcher |
Class Detail: Factory |
Method Detail |
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 |
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
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
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
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 |
VAR factory-: Factory
VAR matcher-: Matcher