shithub: mc

ref: 2c113e30f0892e015ae61ab8f453c9b3a073c73b
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
	dst = slgrow(dst, len + src.len)
	slcp(dst[len:], src)
	-> dst 
}