added clamp function and extensions, fixed bug in range coloring

This commit is contained in:
sergeych committed 2026-01-18 07:18:51 +03:00
1 parent 0759346e4b
commit 5dc2159024
9 files changed
+205 -16

No files matched your search

+4 -3
View File
@@ -98,10 +98,11 @@ Exclusive end char ranges are supported too:
| isEndInclusive | true for '..' | Bool |
| isOpen | at any end | Bool |
| isIntRange | both start and end are Int | Bool |
| start | | Bool |
| end | | Bool |
| start | | Any? |
| end | | Any? |
| size | for finite ranges, see above | Long |
| [] | see above | |
| | | |
Ranges are also used with the `clamp(value, range)` function and the `value.clamp(range)` extension method to limit values within boundaries.
[Iterable]: Iterable.md