RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.Concat Function

Concatenates two or more strings into one.

Pascal
function Concat(s1: string): string; overload;
function Concat(s1: string; s2: string): string; overload;
function Concat(s1: string; s2: string; s3: string): string; overload;
C++

System

In Delphi code, use Concat to concatenate an arbitrary number of strings. Each parameter is a string-type expression. The result is the concatenation of all the string parameters. 

The syntax shown here for Concat demonstrates that the procedure can take a variable number of arguments. 

Using the plus (+) operator has the same effect on two strings as using the Concat function: 

S := 'ABC' + 'DEF';

Tip: The plus operator is faster than Concat.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!