mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 10:45:08 -06:00
Correct the doc of array.slice function
The minor mistake in the documentation of array.slice function is corrected. Signed-off-by: Sedat Gökcen <sedat@sedooe.com>
This commit is contained in:
committed by
Torin Sandall
parent
ac27b855cc
commit
33fba2597e
@@ -54,7 +54,7 @@ complex types.
|
||||
| Built-in | Description |
|
||||
| ------- |-------------|
|
||||
| <span class="opa-keep-it-together">``output := array.concat(array, array)``</span> | ``output`` is the result of concatenating the two input arrays together. |
|
||||
<span class="opa-keep-it-together">``output := array.slice(array, startIndex, stopIndex)``</span> | ``output`` is the part of the ``array`` from ``startIndex`` to ``stopIndex`` including the first but excluding the last. If `startIndex < stopIndex` then `output == []`. If both `startIndex` and `stopIndex` are less than zero, `output == []`. Otherwise, `startIndex` and `stopIndex` are clamped to 0 and `count(array)` respectively. |
|
||||
<span class="opa-keep-it-together">``output := array.slice(array, startIndex, stopIndex)``</span> | ``output`` is the part of the ``array`` from ``startIndex`` to ``stopIndex`` including the first but excluding the last. If `startIndex >= stopIndex` then `output == []`. If both `startIndex` and `stopIndex` are less than zero, `output == []`. Otherwise, `startIndex` and `stopIndex` are clamped to 0 and `count(array)` respectively. |
|
||||
|
||||
### Sets
|
||||
|
||||
|
||||
Reference in New Issue
Block a user