Crate query_range

Source
Expand description

§Query Range Iterator

This package provides an iterator (conforming to Iterator) which finds all ranges of a query within the searched content. The iterator can be collected, mapped or used manually (by calling the next() method until no further result is returned).

This also exports several range utilities for use with strings.

Modules§

Structs§

Enums§

  • Enum to specify the direction of a shift, up or down with amount (magnitude).

Functions§

  • Gets first range of given query in given content.
  • Checks if a closed range exists in given string content.
  • Creates a new range with the start and end values shifted by the given amount.
  • Creates a new range with the start and end values shifted by the given amount and checks that the range is valid in the given content. If new range falls outside of the given content, None will be returned.
  • Converts a string to title case (first letter capitalized and all the rest lower-case).