Merge pull request #2728 from mgee/fix-slicing-in-tut1
use new syntax for negative slicing in tut1
This commit is contained in:
commit
2950732ec3
1 changed files with 1 additions and 1 deletions
|
|
@ -1325,7 +1325,7 @@ define operators which accept Slice objects to define ranges.
|
|||
b = "Slices are useless."
|
||||
|
||||
echo a[7..12] # --> 'a prog'
|
||||
b[11.. -2] = "useful"
|
||||
b[11.. ^2] = "useful"
|
||||
echo b # --> 'Slices are useful.'
|
||||
|
||||
In the previous example slices are used to modify a part of a string, and even
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue