Something like...

lPOS := POS('|', lStr);
while lPOS > 0 do
begin
  // do what you want with the string.
  // make sure you delete the string to remove the first occurrance
  // of | that is found....
  // eg
  //    lTheStr := Copy(lStr, 1, lPOS - 1);
  //    System.Delete(lStr, 1, lPOS);
  //    ListBox1.Items.Add(lTheStr);
  lPOS := POS('|', lStr);
end;

JED



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the [EMAIL PROTECTED]

**********************************************************************
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to