NetLogo 7.0.0:

sublist2.1 substring1.0

sublist list position1 position2 substring string position1 position2

Reports just a section of the given list or string, ranging between the first position (inclusive) and the second position (exclusive). To include the last item position2 should equal the length of the list or string.

If either position is fractional, it will be rounded down to the nearest integer (4.5 becomes 4, 10.9 becomes 10).

Note: The positions are numbered beginning with 0, not with 1.

show sublist [99 88 77 66] 1 3
=> [88 77]
show sublist [99 88 77 66] 1 4
=>  [88 77 66]
show sublist [99 88 77 66] 1 5
ERROR: Runtime error: 5 is greater than the length of the input list (4).
show substring "apartment" 1 5
=> "part"

Take me to the full NetLogo Dictionary