shithub: mc

ref: d073dcc756169e572f54e65f05ba6b4ffaddcde3
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#
}