@ -21,6 +21,18 @@ static usize strncpy_n(char*pOUT dest, const char* restrict src, usize n)
return i ;
}
// Will not write past `dn` bytes of `dest`, will not read past `sn` bytes of `src`. Otherwise, same as `strncpy_n()`.
static usize s_strncpy_n ( usize sn , usize dn ; char dest [ static pOUT dn ] , usize dn , const char src [ static restrict sn ] , usize sn )
{
TODO ( " double-bounded strncpy " ) ;
}
// Will not write past `dn` bytes of `dest`, will not read past `sn` bytes of `src`. Otherwise, same as `strncat_n()`.
static usize s_strncat_n ( usize sn , usize dn ; char dest [ static pOUT dn ] , usize dn , const char src [ static restrict sn ] , usize sn )
{
TODO ( " double-bounded strncat " ) ;
}
// Returns number of bytes written to (dest+strlen(dest)). Otherwise same as `strncat()`.
static inline usize strncat_n ( char * pOUT dest , const char * restrict src , usize n )
{