From 7a37b93f1b40ba83cc68965b1c80c35363c1493d Mon Sep 17 00:00:00 2001
From: Mike Pall
In the first syntax, len gives the number of bytes to copy. -In case src is a Lua string, the maximum copy length is the -number of bytes of the string plus a zero-terminator. Caveat: the -copied data may not be zero-terminated if len ≤ #src. +Caveat: if src is a Lua string, then len must not +exceed #src+1.
In the second syntax, the source of the copy must be a Lua string. All -bytes of the string plus a zero-terminator are copied to dst. +bytes of the string plus a zero-terminator are copied to +dst (i.e. #src+1 bytes).
Performance notice: ffi.copy() may be used as a faster -- cgit v1.2.3-55-g6feb