shithub: mc

ref: a843f825632bd19e34a81bccf9b8a015a0196586
dir: /lib/std/sljoin.myr/

View raw version
use "alloc.use"
use "slcp.use"

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

generic sljoin = {dst, src
	var len

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