summaryrefslogtreecommitdiff
path: root/lib/std/sljoin.myr
blob: f1fe58ab228dc9f06c69ff22a31b5cc1b6620cec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use "alloc.use"
use "slcp.use"

pkg std =
	generic sljoin	: (dst : @a[:], src : @a[:]	-> @a[:])
;;

generic sljoin = {dst, src
	var len

	len = dst.len
	dst = slgrow(dst, len + src.len)
	slcp(dst[len:], src)
	-> dst 
}