slice
Returns items from an array or a substring from a string from a specified start index. The return value is inclusive of the start index.
Return
array or string
Parameters
input
the array or string expression
from Index
the index to start slice from
See also
<a href="https://maplibre. org/maplibre-style-spec/expressions/#slice">Style specification</a>
open fun slice(@NonNull input: Expression, @NonNull fromIndex: Expression, @NonNull toIndex: Expression): Expression
Returns items from an array or a substring from a string between a start index and an end index if set. The return value is inclusive of the start index, but not of the end index.
Return
array or string
Parameters
input
the array or string expression
from Index
the index to start slice from
to Index
the index to end slice at
See also
<a href="https://maplibre. org/maplibre-style-spec/expressions/#slice">Style specification</a>