1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
<HTML>
<HEAD>
<TITLE>TSP (libtsp/ST) - STcopyNMax</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFACD">
<H2>STcopyNMax</H2>
<HR>
<H4>Routine</H4>
<DL>
<DT>
int STcopyNMax (const char Si[], char So[], int N, int Maxchar)
</DL>
<H4>Purpose</H4>
<DL>
<DT>
Copy N characters characters to a string
</DL>
<H4>Description</H4>
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.
<H4>Parameters</H4>
<P>
<PRE>
Number of characters in the output string
</PRE>
<DL>
<DT>
-> const char Si[]
<DD>
Input character string
<DT>
<- char So[]
<DD>
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.
<DT>
-> int N
<DD>
Number of characters to be transferred
<DT>
-> int Maxchar
<DD>
Maximum number of characters (not including the terminating null
character) to be placed in So.
</DL>
<H4>Author / revision</H4>
P. Kabal Copyright (C) 1997
/ Revision 1.15 1997/03/03
<H4>See Also</H4>
<A HREF="STcatMax.html">STcatMax</A>,
<A HREF="STcopyMax.html">STcopyMax</A>
<P>
<HR>
Main Index <A HREF="../libtsp.html">libtsp</A>
</BODY>
</HTML>
|