shithub: mc

ref: 034acf0ceac80411fc85bbd4cc9e237d26a6e36c
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
	slgrow(dst, len + src.len)
	slcp(dst#[len:], src)
	-> dst#
}