OCLOperators subSequence
No edit summary
No edit summary
Line 2: Line 2:
  subSequence(<start>, <stop>)
  subSequence(<start>, <stop>)
Please note that the index number is 1-based.
Please note that the index number is 1-based.
Example;
  Sequence{1..20}->subSequence(10,15)
  Sequence{1..20}->subSequence(10,15)
The expression above will return numbers 10, 11, 12, 13, 14 and 15.
The expression above will return numbers 10, 11, 12, 13, 14 and 15.

Revision as of 11:42, 25 November 2020

This page was created by Alexandra on 2017-08-13. Last edited by Edgar on 2025-01-20.

Returns a smaller collection from a start to stop.

subSequence(<start>, <stop>)

Please note that the index number is 1-based.

Example;

Sequence{1..20}->subSequence(10,15)

The expression above will return numbers 10, 11, 12, 13, 14 and 15.

If you supply index values outside the source collection, the result collection will be empty.

MDriven Chat

How would you like to chat today?

Setting up your conversation…

This may take a few moments