TSP (libtsp/ST) - STcopyNMax

## 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, strlen(Si)) characters from the input input string to the output string. If min(N, strlen(Si) is greater than Maxchar, a string is truncated at that point and a 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.
-> 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) 1998 / Revision 1.18 1998/06/16

#### See Also

STcatMax, STcopyMax

Main Index libtsp