str_cat (STRING* string1, STRING* string2)

Appends a copy of string2 to the end of string1. If the fixed length of string1 was shorter than the result, it will be truncated.

Parameters:

string1 - target string
string2 - string or char* to be added

Returns:

string1

Modifies:

string1 = string1 + string2

Speed:

Medium

Example:

string s[30]; 
str_cpy(s,"Hello"); // now s == "Hello "
str_cat(s,"World"); // now s == "Hello World"
Variable length strings will never be truncated:
string tstring1; // define a unlimited length string 
function stringtest()
{
  var i = 10;
  str_cpy(tstring1,"12345");
  while (i > 0) 
  {
    str_cat(tstring1,"abcd"); // increase the length of the string 
    i -= 1;
  }
}

See also:

str_cpy, str_cmp, str_cmpi, str_cmpni, str_len, str_clip, str_trunc, str_stri