Use ^ instead of - in slices
This commit is contained in:
parent
2b80d75aa2
commit
64903e7050
10 changed files with 93 additions and 93 deletions
|
|
@ -2874,7 +2874,7 @@ when hostOS != "standalone":
|
|||
##
|
||||
## .. code-block:: nim
|
||||
## var s = "abcdef"
|
||||
## s[1 .. -2] = "xyz"
|
||||
## s[1 .. ^2] = "xyz"
|
||||
## assert s == "axyzf"
|
||||
var a = x.a
|
||||
var L = x.b - a + 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue