Copy characters of one string to another.
LPSTR strncpy( LPSTR lpString1, LPCSTR lpString2, int iMaxLength )
If the function succeeds, the return value is a pointer to the buffer. If the function fails, the return value is NULL.
EX1
void strncpy_ex1() { string str1 = "Hello World!"; char szStr[80]; strncpy(szStr, str1, 5); out_str(szStr); // Should be "Hello" }
origin.h