strxfrm.c - scc - simple c99 compiler
 (HTM) git clone git://git.simple-cc.org/scc
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
       strxfrm.c (189B)
       ---
            1 #include <string.h>
            2 
            3 #undef strxfrm
            4 
            5 size_t
            6 strxfrm(char * restrict dst, const char * restrict src, size_t n)
            7 {
            8         size_t len = strlen(src);
            9 
           10         if (len < n)
           11                 strcpy(dst, src);
           12         return len;
           13 }