strscpy_pad — Copy a C-string into a sized buffer
ssize_t strscpy_pad ( | char * dest, |
| const char * src, | |
size_t count); |
destWhere to copy the string to
srcWhere to copy the string from
countSize of destination buffer
Copy the string, or as much of it as fits, into the dest buffer. The
behavior is undefined if the string buffers overlap. The destination
buffer is always NUL terminated, unless it's zero-sized.
If the source string is shorter than the destination buffer, zeros the tail of the destination buffer.
For full explanation of why you may want to consider using the
'strscpy' functions please see the function docstring for strscpy.