fxlibc/src/string/strxfrm.c
Yann MAGNIN 619afe25da fxlibc - v1.4.2 : fix reallocarray() + remove old Vhex/Casiowin sources
@update
> CMakeLists.txt
  | remove casiowin-* target (unused)
  | remove x86-generic target (unused)
  | update files location
  | remove old vhex sources files (deprecated, unused)
> src/posix
  | remove this folder
> src/libc
  | move its content to src/
  | remove thread module
> src/stdlib/reallocarray
  | check if the multiplication overflow failed
  | set appropriate errno value if multiplication failed
2022-06-03 16:25:31 +02:00

9 lines
173 B
C

#include <string.h>
#include <locale.h>
size_t strxfrm(char * restrict dest, char const * restrict src, size_t n)
{
if(dest) strncpy(dest, src, n);
return strlen(src);
}