(C) 1998 AROS - The Amiga Research OS


NAME
#include <string.h>

char * strncpy ()

SYNOPSIS
char * dest
const char * src
size_t n

FUNCTION
Copy a string. Works like an assignment "dest=src;". At most n characters are copied.

INPUTS
dest
The string is copied into this variable. Make sure it is large enough.
src
This is the new contents of dest.
n
How many characters to copy at most. If the string src is smaller than that, only strlen(str)+1 bytes are copied.

RESULT
dest.

EXAMPLE

SEE ALSO
strncpy(), memcpy(), memmove()

NOTES
No check is beeing made that dest is large enough for src.

BUGS

INTERNALS

HISTORY
20.10.1998 hkiel
Amiga Research OS
21.07.1998 hkiel
Fixed bug which decreased counter one too much which lead to infinite loops
19.07.1998 srittau
ANSI-C compatible behaviour: pad destination string with null-bytes
11.12.1996 aros
New functions