OCLOperators indexOf
No edit summary
No edit summary
Line 6: Line 6:
|-
|-
|Sequence{'a', 'b'}->indexOf('a')
|Sequence{'a', 'b'}->indexOf('a')
|1
|0
|}
|}
The 1 based index of an object in the collection possibly -1 if not existing
The zero based index of an object in the collection possibly -1 if not existing
[[Category:OCLOperators]]
[[Category:OCLOperators]]

Revision as of 15:33, 29 November 2021

indexOf ( object : T ) : Integer

Returns the position of object in sequence self.

Expression Result
Sequence{'a', 'b'}->indexOf('a') 0

The zero based index of an object in the collection possibly -1 if not existing

This page was edited 80 days ago on 02/10/2024. What links here