shithub: mc

ref: 0f3f41fae775b2647cd0cdaf0a9ef395c19b9878
dir: /lib/std/sljoin.myr/

View raw version
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#
}