Skip to content

RangeOf

Generated from the engine's own definition: compute-engine's symbol, which we neither extend nor document by hand. No examples yet — the crosswalk is the reason it has a page.

Return the 1-based inclusive index span of the first occurrence of `needle` as a contiguous subsequence of the indexed collection, or `Nothing` when it does not occur. The search starts at index `from` (1 by default) and the span is always expressed in the original collection's indices, so `RangeOf(xs, needle, Last(r) + 1)` finds the next non-overlapping occurrence and the loop ends at `Nothing`. On a string the needle is matched character by character, so a match never begins or ends inside a grapheme cluster.

RangeOf(indexed_collection<T>, indexed_collection<T>, from: integer?) -> nothing | range where Tas compute-engine declares it

Domain: Compute engine