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§
- Query
Range Itr - Iterates all found query within given content.
Enums§
- Shift
- Enum to specify the direction of a shift, up or down with amount (magnitude).
Functions§
- get_
range - Gets first range of given query in given content.
- is_
within - Checks if a closed range exists in given string content.
- shift_
range - Creates a new range with the start and end values shifted by the given amount.
- shift_
range_ in_ content - 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. - to_
title_ case - Converts a string to title case (first letter capitalized and all the rest lower-case).