x[y...]
(upper span) operator
The upper span operator returns the tail of its left-hand Ranged
operand
as specified by its right-hand operand.
Usage
String[] names = {"foo", "bar", "baz"};
String[] secondAndThird = names[1...];
String[] third = names[2...];
String[] emptySequence = names[3...];
Description
Definition
The lhs[rhs...]
operator is defined as follows:
lhs.spanFrom(rhs)
See the language specification for more details.
Polymorphism
The x[y...]
operator is polymorphic.
The meaning of x[y...]
depends on the
Ranged
interface.
Type
The result type of the lhs[from..]
operator is the element type of the Ranged
lhs
.
See also
-
x[y..z]
(span) operator used for obtaining a span of aRanged
. -
x[...z]
(lower span) operator used for obtaining a span of aRanged
. - API documentation for
Ranged
- sequence operators in the language specification
- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon