1fmt_pad(3)                 Library Functions Manual                 fmt_pad(3)
2
3
4

NAME

6       fmt_pad - pad a string with spaces.
7

SYNTAX

9       #include <fmt.h>
10
11       size_t fmt_pad(char *dest, const char *source,
12             size_t srclen, size_t padlen,
13             size_t maxlen);
14

DESCRIPTION

16       fmt_pad  writes  padlen-srclen  spaces (if that number is positive) and
17       then srclen characters from source.  It truncates the  output  only  if
18       the length would exceed maxlen.
19
20       It returns the number of bytes it wrote.
21
22       fmt_pad does not append \0.
23
24       If  dest  equals  FMT_LEN (i.e. is zero), fmt_pad returns the number of
25       bytes it would have written.
26

SEE ALSO

28       fmt_strn(3), fmt_fill(3)
29
30
31
32                                                                    fmt_pad(3)
Impressum