NWstrncpy
Copies a locale-sensitive string for a specified number of characters (not bytes)
#include <time.h> or #define NWL_EXCLUDE_TIME
#include <stdio.h> or #define NWL_EXCLUDE_FILE
#include <nwlocale.h>
pnstr N_API NWstrncpy (
pnstr target_string,
const nstr N_FAR *source_string,
nint numChars);
uses netwin32
Function NWstrncpy
(target_string : pnstr;
source_string : pnstr;
numChars : nint
) : pnstr;
NWstrncpy copies a string of up to the number of characters specified by the numChars parameter to the destination string and NULL-terminates the string if the source string contains less characters than the number specified by the numChars parameter. However, unlike the ANSI strncpy function, NWstrncpy does not pad any remaining space in the destination string with NULLs.
To guarantee a NULL-terminated string, set the numChars parameter equal to the length of the target_string parameter minus one and set the last element of the target_string parameter equal to zero.