minor tut1 update

This commit is contained in:
Araq 2015-05-28 12:44:31 +02:00
commit 5824be8e8c

View file

@ -1325,11 +1325,11 @@ define operators which accept Slice objects to define ranges.
b = "Slices are useless." b = "Slices are useless."
echo a[7..12] # --> 'a prog' echo a[7..12] # --> 'a prog'
b[11.. -2] = "useful" b[11..^2] = "useful"
echo b # --> 'Slices are useful.' echo b # --> 'Slices are useful.'
In the previous example slices are used to modify a part of a string, and even In the previous example slices are used to modify a part of a string. The
a negative index is used. The slice's bounds can hold any value supported by slice's bounds can hold any value supported by
their type, but it is the proc using the slice object which defines what values their type, but it is the proc using the slice object which defines what values
are accepted. are accepted.