shithub: mc

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