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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replace chr(10) with chr(13)+chr(10)

Status
Not open for further replies.

edelwater

Programmer
Jun 29, 2000
203
EU
I have lots of strings which have only chr(10) as eol. They show up like little blocks in a certain app.

I want to write a hook which replaces the chr(10) with chr(13)+chr(10). The unhandy thing is that the correct chr(13)+chr(10) should be left alone.

I need to write the hook in CQ which supports simple VB scripting so no .net.

Does anyone have a code for this?






--
 
theString = Replace(Replace(theString, Chr(13), ""), Chr(10), Chr(13) & Chr(10))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Another good thing:
Enlaso Rainbow (Freeware)

with it you can convert batches of files from one encoding into various others, including the use of e.g. Java escape sequences (\uxxxx), XML verification and validation,
==> and line breaks conversions DOS/UNIX/MAC.

Check it out. I am using it regularly and am very happy with it.

Good luck!
Andy

[blue]Help us, join us, participate
IAHRA - International Alliance of Human Rights Advocates[/blue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top