DOKK / manpages / debian 11 / libowfat-dev / fmt_strn.3.en
fmt_strn(3) Library Functions Manual fmt_strn(3)

fmt_strn - write an ASCII string

#include <fmt.h>

size_t fmt_strn(char *dest,const char *source,
size_t maxlen);

fmt_str copies at most maxlen leading nonzero bytes from source to dest and returns the number of bytes it copied.

fmt_str does not append \0.

If dest equals FMT_LEN (i.e. is zero), fmt_strn returns the number of bytes it would have written.

strncpy(3)