summary refs log tree commit diff stats
path: root/tests/stdlib/tropes.nim
blob: 59239a60052eba7e1bbbb7e70bf26336db8602dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
discard """
  file: "tropes.nim"
  output: '''0
3

123
3
6
123
123456
2
3'''
"""
import ropes

var
  r1 = rope("")
  r2 = rope("123")

echo r1.len
echo r2.len

echo r1
echo r2

r1.add("123")
r2.add("456")

echo r1.len
echo r2.len

echo r1
echo r2

echo r1[1]
echo r2[2]