core :: Buffer :: times
self
r
var b = new Buffer b.append "hello" b.times 3 assert b == "hellohellohello"
# `self` is appended in such a way that `self` is repeated `r` times # # ~~~ # var b = new Buffer # b.append "hello" # b.times 3 # assert b == "hellohellohello" # ~~~ fun times(r: Int) is abstract
redef fun times(repeats) do var bln = _byte_length var x = new FlatString.full(_items, bln, 0, _length) for i in [1 .. repeats[ do append(x) end end