shithub: mc

ref: b321f9668ab0b35228945ab9481e6d7a27fe635d
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 
}