INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

description: "Wildcard matcher"
cluster: matcher
class WILDCARD
inherit

MATCHER
end

REGEXP_ERRORS
end
creation

make,
make_insensitive,
make_sensitive
feature -- Modification

set_sensitive
-- Make the matcher case-sensitive.

set_insensitive
-- Make the matcher case-insensitive.

set_multi_line
-- Set matcher in multi-line mode. Mode is kept until matcher is
-- explicitely set to single-line mode.

set_single_line
-- Set matcher in single-line mode. Mode is kept until matcher is
-- explicitely set to multi-line mode.
feature -- Status report

multi_line: BOOLEAN
-- Is matcher in multi-line mode?

single_line: BOOLEAN
-- Is matcher in single-line mode? This is the default on object
-- creation.
feature -- Searching

search_forward (s: STRING; s_from, s_to: INTEGER)
-- Search for `pattern' in string `s'. Start searching at index
-- position `s_from' and search until the pattern matches (while
-- ignoring any characters behind `s_to'). If pattern matches, set
-- `found' to true and `start_position' and `end_position'
-- to the corresponding index positions (relative to the beginning
-- of the string). If the pattern doesn't match, set `found' to
-- false, but do not modify `start_position' or `end_position'.

search_backward (s: STRING; s_from, s_to: INTEGER)
-- Search for `pattern' in string `s'. Start searching at index
-- position `s_to' and search backward until the pattern matches
-- (ignoring any characters before `s_from'). If pattern matches,
-- set `found' to true and `start_position' and `end_position'
-- to the corresponding index positions (relative to the beginning
-- of the string). If the pattern doesn't match, set `found' to
-- false, but do not modify `start_position' or `end_position'.
feature -- Matching actions

match (s: STRING)
-- Match `pattern' against string `s'. The whole string must
-- match. Set attributes `found' and - if match succeeded -
-- `start_position' and `end_position'.

match_prefix (s: STRING)
-- Match `pattern' against any prefix of string `s'.
-- Matching is forward in `s'. Set attributes `found' and -
-- if match succeeded - `start_position' and `end_position'.

match_suffix (s: STRING)
-- Match `pattern' against any suffix of string `s'.
-- Matching is backward in `s'. Set attributes `found' and -
-- if match succeeded - `start_position' and `end_position'.

match_left_part (s: STRING)
-- Match `pattern' against any substring of string `s'.
-- Matching is from left to right. Set attributes `found' and -
-- if match succeeded - `start_position' and `end_position'.

match_right_part (s: STRING)
-- Match `pattern' against any substring of string `s'.
-- Matching is from right to left. Set attributes `found' and -
-- if match succeeded - `start_position' and `end_position'.
feature -- Matching questions

matches (s: STRING): BOOLEAN
-- Does string `s' matches with pattern? The whole string must
-- match. None of the position attributes nor `found' is modified.

matches_prefix (s: STRING): BOOLEAN
-- Does any prefix of string `s' matches with pattern?
-- Neither a position attribute nor `found' is modified.

matches_suffix (s: STRING): BOOLEAN
-- Does any suffix of string `s' matches with pattern?
-- Neither a position attribute nor `found' is modified.

matches_left_part (s: STRING): BOOLEAN
-- Does any substring of `s' matches with pattern?
-- Neither a position attribute nor `found' is modified.

matches_right_part (s: STRING): BOOLEAN
-- Does any substring of `s' matches with pattern?
-- Neither a position attribute nor `found' is modified.
end -- class WILDCARD

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES