Skip to content
Prev 11101 / 12125 Next

[R-pkg-devel] truncating strings on purpose

You could use memcpy instead. That gets rids of the type checking though.

You could also define something like char * my_strncpy ( char *
destination, const char * source, size_t num ) { return (char *)
memcpy(destination, source, num) } to keep the type checking.
On Wed, Dec 11, 2024, 07:12 Brad Eck <bradleyjeck at gmail.com> wrote: