EdgeQL Tutorial

Operators

Subtopics

The same 3 types that share the indexing operator (str, bytes, and arrays) also share the ability to cut out a slice of values between given two indexes. The operator returns all the elements starting with the first index value given and up to, but not including the second index value:

Input
Run
Output
Press the 'Run' button to evaluate the input
Input
Run
Output
Press the 'Run' button to evaluate the input
Input
Run
Output
Press the 'Run' button to evaluate the input

If a negative value is given as an index, it is interpreted to indicate an element relative to the end of the string or array:

Input
Run
Output
Press the 'Run' button to evaluate the input