An alternative to system...< which, instead of subtracting 1, treats the end of the slice as having a marginal difference from the given number.
Procs
func contains[T, U, V](s: UntilSlice[T, U]; x: V): bool
- Checks that x is not equal to s.b.val, then checks if s.a .. s.b.val contains x. Source Edit
func len[T, U](s: UntilSlice[T, U]): int
- Returns the value of len(s.a .. s.b.val) and subtracts 1 if s.b.val is in s.a .. s.b.val. Source Edit
Iterators
iterator items[T, U](s: UntilSlice[T, U]): auto {.noSideEffect.}
- Iterates over items(s.a .. s.b.val) and yields all the values that are not equal to s.b.val. Source Edit