shithub: mc

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