1ustrzncpy(3)                    Allegro manual                    ustrzncpy(3)
2
3
4

NAME

6       ustrzncpy  - Copies a string into another one, specifying size. Allegro
7       game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       char *ustrzncpy(char *dest, int size, const char *src, int n);
14

DESCRIPTION

16       This function is like ustrzcpy() except that no more than  `n'  charac‐
17       ters  from `src' are copied into `dest' whose length in bytes is speci‐
18       fied by `size' and which is guaranteed to be  null-terminated  even  if
19       `src'  is  bigger than `size'. If `src' is shorter than `n' characters,
20       null characters are appended to `dest' as padding until `n'  characters
21       have  been written. In any case, `dest' is guaranteed to be null-termi‐
22       nated.
23
24       Note that, even for empty strings, your destination string must have at
25       least  enough  bytes  to  store  the  terminating null character of the
26       string, and your parameter `size' must  reflect  this.  Otherwise,  the
27       debug  version  of  Allegro will abort at an assertion, and the release
28       version of Allegro will overrun the destination buffer.
29

RETURN VALUE

31       The return value is the value of `dest'.
32
33

SEE ALSO

35       uconvert(3), ustrzcpy(3), ustrncpy(3), exkeys(3)
36
37
38
39Allegro                          version 4.4.2                    ustrzncpy(3)
Impressum