parent
6a37c0682a
commit
ab2c082cb3
2 changed files with 67 additions and 1 deletions
|
|
@ -204,8 +204,8 @@ proc `[]`*(r: Rope, i: int): char {.rtl, extern: "nroCharAt".} =
|
|||
if x.left.length > j:
|
||||
x = x.left
|
||||
else:
|
||||
dec(j, x.left.length)
|
||||
x = x.right
|
||||
dec(j, x.len)
|
||||
|
||||
iterator leaves*(r: Rope): string =
|
||||
## iterates over any leaf string in the rope `r`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue