TSP (libtsp/ST) - STcatMax

## STcatMax

#### Routine

int STcatMax (const char Si[], char So[], int Maxchar)

#### Purpose

Concatenate at characters to a string (maximum length specified)

#### Description

This routine appends characters from the input string to the end of the second string. Characters are appended until a null is seen in the input string or the number of characters in the second string is Maxchar. Then a trailing null character is appended to the output string. If not all characters from the input string can be copied into the output string, a string truncated warning message is printed.

#### Parameters

<- int STcatMax
  Number of characters in the output string
-> const char Si[]
  Input character string to be appended to So
<-> char So[]
  Output character string. This string is always null terminated, with at most Maxchar characters not including the terminating null character. If the sum of the input string lengths is more than Maxchar, only the first Maxchar characters appear in So and a warning message is printed.
-> int Maxchar
  Maximum number of characters (not including the trailing null character) to appear in So. Note that if Si is initially longer than Maxchar, it is truncated to this length.

#### Author / revision

P. Kabal Copyright (C) 1998 / Revision 1.20 1998/06/17

#### See Also

STcopyMax, STcopyNMax

Main Index libtsp