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

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

generic sljoin = {dst, src
	var len

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