Skip to main content

Module range

Module range 

Source
Expand description

Provides Range type expanding on RangeBounds.

Structs§

Range
A range of chars within the text.

Functions§

is_exact_subset
Similar to is_subset but requires each element of super_set to be matched
is_subset
Returns true if all ranges yielded by sub_set are contained by super_set. This is essentially an optimized implementation of sub_set.all(|rb| super_set.any(|ra| ra.contains(rb))) that runs in O(m+n) instead of O(mn) (and in many cases faster).