shithub: mc

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