Internet Direct (Indy)
Home
PreviousUpNext
CommaAdd Function

Constructs a comma-delimited list of values.

Pascal
function CommaAdd(
    Const AStr1: String; 
    Const AStr2: String
): string;
Parameters 
Description 
AStr1 
Inital value in the list.
 
AStr2 
Final value in the list. 

CommaAdd is a String function used to construct a comma-delimited list containing the values in AStr1 and AStr2. CommaAdd appends a comma to the value in AStr1 followed by the value in AStr2. If AStr1 contains an empty string (''), the return value for the function contains only the value in AStr2.

(Delphi) 

 

  sList := CommaAdd('', 'Hello');         // returns 'Hello'
  sList := CommaAdd('Hello', 'World!!!'); // returns 'Hello, World!!!'
Internet Direct (Indy) version 10.1.5
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Website http://www.indyproject.org.
Post feedback to the Indy Documentation newsgroup.