STcopyNMax
Routine
-
int STcopyNMax (const char Si[], char So[], int N, int Maxchar)
Purpose
-
Copy N characters characters to a string
Description
This routine is used to copy min(N,Maxchar) characters from the input string
to the output string. A null character in the input string also terminates
the transfer at that point. If N is larger than Maxchar, a string truncated
warning message is printed.
Parameters
Number of characters in the output string
-
-> const char Si[]
-
Input character string
-
<- char So[]
-
Output character string. This string is always null terminated, with
at most Maxchar characters not including the terminating null character.
If the input string is longer than Maxchar, only the first Maxchar
characters are copied and a warning message is printed.
-
-> int N
-
Number of characters to be transferred
-
-> int Maxchar
-
Maximum number of characters (not including the terminating null
character) to be placed in So.
Author / revision
P. Kabal Copyright (C) 1997
/ Revision 1.15 1997/03/03
See Also
STcatMax,
STcopyMax
Main Index libtsp