OAR

RTEMS GNU Tools On-Line Library


strncpy

PREV UP NEXT Bookshelf

4.24: strncpy---counted copy string

Synopsis

#include <string.h>
char *strncpy(char *dst, const char *src, size_t length);

Description
strncpy copies not more than length characters from the the string pointed to by src (including the terminating null character) to the array pointed to by dst. If the string pointed to by src is shorter than length characters, null characters are appended to the destination array until a total of length characters have been written.


Returns
This function returns the initial value of dst.


Portability
strncpy is ANSI C.

strncpy requires no supporting OS subroutines.



PREV UP NEXT Bookshelf

Packaging copyright © 1988-2000 OAR Corporation
Context copyright by each document's author. See Free Software Foundation for information.