Wayne Barron
asked on
Delete "White Spaces" in TMemo
Hello All;
I need to "Delete White Spaces"
I need all White Spaces in a TMemo to be deleted.
Example:
( Memo Outline )
-------------TOP---------- ------
above is "3" White Spaces
Below is "3" White Spaces
------------Bottom-------- ------
I need to have this located under a Button.
Any idea's on this will be great.
carrzkiss
I need to "Delete White Spaces"
I need all White Spaces in a TMemo to be deleted.
Example:
( Memo Outline )
-------------TOP----------
above is "3" White Spaces
Below is "3" White Spaces
------------Bottom--------
I need to have this located under a Button.
Any idea's on this will be great.
carrzkiss
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you [Pierre];
Your code works very well.
Thank You for your time again, in this post.
I awarded you the points because your code works well.
Even though with the last question that I asked, that you both
Were a part of, this code here does it all.
for Q :=Memo1.Lines.Count -1 downto 0 do
begin
if pos( 'http://', lowercase(Memo1.Lines[Q]) ) = 0
then Memo1.Lines.Delete(Q);
end;
https://www.experts-exchange.com/questions/21123097/Delete-Characters-that-do-not-begin-with-http-in-TMemo.html
From Everst
Thank you all
Wayne
Your code works very well.
Thank You for your time again, in this post.
I awarded you the points because your code works well.
Even though with the last question that I asked, that you both
Were a part of, this code here does it all.
for Q :=Memo1.Lines.Count -1 downto 0 do
begin
if pos( 'http://', lowercase(Memo1.Lines[Q]) ) = 0
then Memo1.Lines.Delete(Q);
end;
https://www.experts-exchange.com/questions/21123097/Delete-Characters-that-do-not-begin-with-http-in-TMemo.html
From Everst
Thank you all
Wayne
Memo1.Lines.Text := StringReplace(Memo1.Lines.
To remove empty lines:
Memo1.Lines.Text := StringReplace(Memo1.Lines.