strConcat (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

ALL

Firmware version:

1.00 / 1.00.00


strConcat concatenates ("adds" together) two strings and returns a string with the result in it.

Also see the '+' operator for an alternative way of concatenating strings.

 

 

Note that the returned string is a dynamic string.

 

Input:

str1 : STRING

Left string.

 

str2 : STRING

Right string.

 

Returns: STRING

The resulting string from concatenating str1 and str2.

 

Declaration:

FUNCTION strConcat : STRING;
VAR_INPUT
  str1, str2 : STRING;
END_VAR;

 

Example:

INCLUDE rtcu.inc
 
VAR
  result : STRING;
END_VAR;
 
PROGRAM test;
 
BEGIN
  ...
result := strConcat(str1:="hello ", str2:="world");
  // result will contain "Hello world" after the call
  ...
END;
 
END_PROGRAM;