Topic Path: Symbol Reference > Functions > CommaAdd Function
ContentsIndexHome
PreviousUpNext
CommaAdd Function

Constructs a comma-delimited list of values.

File
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!!!'
Copyright © 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.