Obtains the smallest valid position that is greater than or equal to the given byte position.
Equations
Instances For
Equations
- String.Slice.findNextPos offset s h = s.posGT offset h
Instances For
Obtains the largest valid position that is less than or equal to the given byte position.
Equations
Instances For
Obtains the largest valid position that is less than or equal to the given byte position.
Equations
- s.posLE offset = String.Pos.ofToSlice (s.toSlice.posLE offset)
Instances For
Returns the previous valid position before the given position, given a proof that the position is not the start position, which guarantees that such a position exists.
Instances For
Returns the previous valid position before the given position, or panics if the position is the start position.
Equations
Instances For
Returns the previous valid position before the given position, given a proof that the position is not the start position, which guarantees that such a position exists.
Equations
- pos.prev h = String.Pos.ofToSlice (pos.toSlice.prev ⋯)
Instances For
Returns the previous valid position before the given position, or none if the position is
the start position.
Equations
- pos.prev? = Option.map String.Pos.ofToSlice pos.toSlice.prev?
Instances For
Returns the previous valid position before the given position, or panics if the position is the start position.
Equations
- pos.prev! = String.Pos.ofToSlice pos.toSlice.prev!