You might also try using ReadLn to access the data. ReadLn reads a line at a time and interprets "a line" as everything upto but not including the #13#10.
Main Topics
Browse All TopicsHi folks,
I've writen some code to load a list into a combobox from a binary file, the info in the file is seperated by a line feed, character return which delphi interprates as '#$D#$A' but I want to get rid of this from the String.
So in short, how can I extract #$D#$A from a String?
p.s. When I inspect a String it reports it like this 'example'#$D#$A, which confuses me as it looks like #$D#$A isn't part of the String :s
help please...
Cheers in advance,
Alexei Blue.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
a character return (CR) is character 13
a line feed (LF) is character 10
in Delphi
the hexadecimal notation for 13 = $D for 10 = $A
to make a character from a integer ascii index: #13 or #10
and to show the same from a hex ascii index: #$D or #$A
what i don't understand is why you go to all the trouble to invent something new ... which allready exists.
combobox.items.savetofile(
combobox.items.loadfromfil
why would you want it binary ?
Business Accounts
Answer for Membership
by: HypoPosted on 2009-08-18 at 09:01:34ID: 25124629
Try search and replacing the pattern with an empty string...
NewString := StringReplace(OldString, #13#10, '', [rfReplaceAll]);
/Hypo