IsBetween asserts that the integer lies within the given range (inclusive).
(min, max int)
| 48 | |
| 49 | // IsBetween asserts that the integer lies within the given range (inclusive). |
| 50 | func (o OnInteger) IsBetween(min, max int) bool { |
| 51 | return o.CompareRaw(o.value, "in", min, "to", max).Test(o.value >= min && o.value <= max) |
| 52 | } |