Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing space in a MemoBox 1

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
Heya Guys,

I have a memo box which has the following data...

115.487055 -31.568225 20
115.487074 -31.568220 20
115.494912 -31.569628 20
115.495709 -31.569537 20
115.495694 -31.569488 20
115.49566 -31.569510 20
115.49565 -31.569579 20
115.495663 -31.569585 20
115.495733 -31.569651 20
115.49566 -31.569462 20

is there a way to remove the "tab" space from between the column and to replace it with a comma?


Delphi, Delphi, Delphi. Oi! Oi! Oi!
 
If you mean TMemo when you say MemoBox then it is easy to replace all the tab characters with commas.

If your TMemo component was called MemoBox then the following should work:
Code:
  MemoBox.Lines.Text := StringReplace ( MemoBox.Lines.Text, #9, ',', [rfReplaceAll] );
I haven't tested it so watch out for typos!

Andrew
Hampshire, UK
 
Thanks,

Once again you have helped me out of a bind TOWERBASE.

Thanks again and again... etc etc


PTU

Delphi, Delphi, Delphi. Oi! Oi! Oi!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top