shithub: mc

ref: 4e656a4f039b9230c820f12d3b1e4a5c8e55cf47
dir: /libstd/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 
}