Mirror of :pserver:cvs@cvs.fefe.de:/cvs libowfat https://www.fefe.de/libowfat/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
675 B

  1. .TH fmt_pad 3
  2. .SH NAME
  3. fmt_pad \- pad a string with spaces.
  4. .SH SYNTAX
  5. .B #include <libowfat/fmt.h>
  6. size_t \fBfmt_pad\fP(char *\fIdest\fR, const char *\fIsource\fR,
  7. size_t \fIsrclen\fR, size_t \fIpadlen\fR,
  8. size_t \fImaxlen\fR);
  9. .SH DESCRIPTION
  10. fmt_pad writes \fIpadlen\fR-\fIsrclen\fR spaces (if that number is
  11. positive) and then \fIsrclen\fR characters from \fIsource\fR. It
  12. truncates the output only if the length would exceed \fImaxlen\fR.
  13. It returns the number of bytes it wrote.
  14. fmt_pad does not append \\0.
  15. If \fIdest\fR equals FMT_LEN (i.e. is zero), fmt_pad returns the number
  16. of bytes it would have written.
  17. .SH "SEE ALSO"
  18. fmt_strn(3), fmt_fill(3)