Pop First Interval Within a Query Interval
Details
Removes the first match in canonical interval order. On miss, returns a
non-throwing miss object with remaining = x.
Use pop_all_within() to remove all matches.
Examples
ix <- interval_index("a", "b", "c", start = c(1, 2, 4), end = c(6, 3, 5))
pop_within(ix, 1, 4)
#> $value
#> [1] "b"
#>
#> $start
#> [1] 2
#>
#> $end
#> [1] 3
#>
#> $remaining
#> Unnamed interval_index with 2 elements, default bounds [start, end).
#>
#> Elements (by interval start order):
#>
#> [[1]] (interval [1, 6))
#> [1] "a"
#>
#> [[2]] (interval [4, 5))
#> [1] "c"
#>
#>