Concatenates self i times

assert "abc" * 4 == "abcabcabcabc"
assert "abc" * 1 == "abc"
assert "abc" * 0 == ""
var b = new Buffer
b.append("天地")
b = b * 4
assert b == "天地天地天地天地"

Property definitions

core $ Text :: *
	# Concatenates self `i` times
	#
	# ~~~
	# assert "abc" * 4 == "abcabcabcabc"
	# assert "abc" * 1 == "abc"
	# assert "abc" * 0 == ""
	# var b = new Buffer
	# b.append("天地")
	# b = b * 4
	# assert b == "天地天地天地天地"
	# ~~~
	fun *(i: Int): SELFTYPE is abstract
lib/core/text/abstract_text.nit:1271,2--1282,36

core $ Buffer :: *
	redef fun *(i) do
		var ret = new Buffer.with_cap(byte_length * i)
		for its in [0 .. i[ do ret.append self
		return ret
	end
lib/core/text/abstract_text.nit:1723,2--1727,4

core $ Concat :: *
	redef fun *(i) do
		var x: String = self
		for j in [1 .. i[ do x += self
		return x
	end
lib/core/text/ropes.nit:126,2--130,4

core $ FlatString :: *
	redef fun *(i) do
		var mybtlen = _byte_length
		var new_byte_length = mybtlen * i
		var mylen = _length
		var newlen = mylen * i
		var its = _items
		var fb = _first_byte
		var ns = new CString(new_byte_length + 1)
		ns[new_byte_length] = 0
		var offset = 0
		while i > 0 do
			its.copy_to(ns, mybtlen, fb, offset)
			offset += mybtlen
			i -= 1
		end
		return new FlatString.full(ns, new_byte_length, 0, newlen)
	end
lib/core/text/flat.nit:619,2--635,4