[][src]Module xi_rope::find

Implementation of string finding in ropes.

Enums

CaseMatching

A policy for case matching. There may be more choices in the future (for example, an even more forgiving mode that ignores accents, or possibly handling Unicode normalization).

FindResult

The result of a find operation.

Functions

compare_cursor_regex

Compare whether the substring beginning at the cursor location matches the provided regular expression. The substring begins at the beginning of the start of the line. If the regular expression can match multiple lines then the entire text is consumed and matched against the regular expression. Otherwise only the current line is matched. Returns the start position of the match.

compare_cursor_str

Compare whether the substring beginning at the current cursor location is equal to the provided string. Leaves the cursor at an indeterminate position on failure, but the end of the string on success. Returns the start position of the match.

compare_cursor_str_casei

Like compare_cursor_str but case invariant (using to_lowercase() to normalize both strings before comparison). Returns the start position of the match.

find

Finds a pattern string in the rope referenced by the cursor, starting at the current location of the cursor (and finding the first match). Both case sensitive and case insensitive matching is provided, controlled by the cm parameter. The regex parameter controls whether the query should be considered as a regular expression.

find_progress

A variant of find that makes a bounded amount of progress, then either returns or suspends (returning TryAgain).

is_multiline_regex

Checks if a regular expression can match multiple lines.