Merge pull request #1831 from homeworkprod/patch-1
Tutorial: Fixed slices example code.
This commit is contained in:
commit
8f82205d12
1 changed files with 1 additions and 1 deletions
|
|
@ -1323,7 +1323,7 @@ define operators which accept TSlice objects to define ranges.
|
||||||
a = "Nim is a progamming language"
|
a = "Nim is a progamming language"
|
||||||
b = "Slices are useless."
|
b = "Slices are useless."
|
||||||
|
|
||||||
echo a[10..15] # --> '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.'
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue