strncpy.c

The libc implementation

Author

Martin ‘Solar’ Baute

License

Public Domain

Summary
strncpy.cThe libc implementation
Functions
strncpyCopies the null terminated string s2 to s1, up to n characters The remaining space, if any, is filled with zeroes

Functions

strncpy

char * strncpy(char * _PDCLIB_restrict s1,
const char * _PDCLIB_restrict s2,
size_t n)

Copies the null terminated string s2 to s1, up to n characters The remaining space, if any, is filled with zeroes

Returns the value of s1

char * strncpy(char * _PDCLIB_restrict s1,
const char * _PDCLIB_restrict s2,
size_t n)
Copies the null terminated string s2 to s1, up to n characters The remaining space, if any, is filled with zeroes