rincewind666
asked on
Add a character to a memo.
I have a memo containing HTML code. The first character must be a <. How can I add a < if it isn't there but not if it is already there?
I use Delphi 6. I need a quick answer so I will give the maximum 500 points. Thanks for your help.
I use Delphi 6. I need a quick answer so I will give the maximum 500 points. Thanks for your help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Type in last comment:
if Trim(Memo1.Lines[liLine][1 ] <> '<' then
should read
if Trim(Memo1.Lines[liLine])[ 1] <> '<' then
if Trim(Memo1.Lines[liLine][1
should read
if Trim(Memo1.Lines[liLine])[
ASKER
Many thanks for your very fast help Jacco.
Anytime!
if (Memo1.Lines[0]+#32)[1] <> '<' then
Memo1.Lines[0] := '<' + Memo1.Lines[0];
Regards Jacco