Delphi: Concatenating strings


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by becky r. on November 13, 2002 at 19:43:17:

I have one string that I want to be a fixed length of 5 characters and another character string I want to be a fixed length of 10 numbers, so when I concatenate them the result string will be 15 characters. How can this be done?

Example
string1 := 'a';
string2 := 'bcd';
string3 := string1 + string2;

I want the output to be "a bcd ".
I tried using the SetLength procedure but when I concatenate the two strings only the first of the strings is stored in the result string.

Please help.

Thanks.


Related Articles and Replies:


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]