Jump to content

Recommended Posts

Posted

Title says it all. I'm wondering if there is a way to replace an @CRLF with nothing or a space.

Thanks,

Kurt

Awaiting Diablo III..

  • Developers
Posted (edited)

  _Kurt said:

Title says it all. I'm wondering if there is a way to replace an @CRLF with nothing or a space.

Thanks,

Kurt

Sure,. just do as the title states ... should work fine :P Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Maybe I'm doing something wrong. Let me look over a couple of stuff. I've been racking my brain over this for twenty minutes.

I'll be soon to respond,

Kurt

Awaiting Diablo III..

Posted (edited)

if it's not working for you, might want to try all CRs the LFs individually.

just incase they dont use Windows-style line-breaks

Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Posted (edited)

Well it seems to work fine for an "ordinary" string:

Example:

$string   = "line 1" & @CRLF & "line 2"
$newstr = StringReplace($string, @CRLF, "")
oÝ÷ ÛMúì,

$newstr = $string ;<-- that's not right

Not sure why this isn't working.

Thanks,

Kurt

Edited by _Kurt

Awaiting Diablo III..

Posted

  theguy0000 said:

if it's not working for you, might want to try all CRs the LFs individually.

just incase they dont use Windows-style line-breaks

$newstr = StringReplace($Text, @CR & @LF, "")

This still does not work for me.

Kurt

Awaiting Diablo III..

  • Developers
Posted

  _Kurt said:

Well it seems to work fine for an "ordinary" string:

Example:

$string   = "line 1" & @CRLF & "line 2"
$newstr = StringReplace($string, @CRLF, "")
oÝ÷ ÛMúì,

$newstr = $string ;<-- that's not right

Not sure why this isn't working.

Thanks,

Kurt

Just save the string to a file and look at it with an HexEditor to check the exact content ..

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

Okay, thanks for a solution! :P

Is there a different way this could be done? Since that may require more time to write/read the file

Thanks again,

Kurt

Awaiting Diablo III..

  • Developers
Posted (edited)

  _Kurt said:

Okay, thanks for a solution! :P

Is there a different way this could be done? Since that may require more time to write/read the file

Thanks again,

Kurt

This is just for debugging ... not permanent !!! Its to check what characters are realy there ...

You could try , as suggested, to replace the CR's and LF's separately:

$newstr = StringReplace($string, @CR, "")

$newstr = StringReplace($newstr , @LF, "")

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted

THANK YOU JdeB! That worked perfectly :P Sorry for misunderstanding the seperate @CR and @LF's before.

Thanks again,

Kurt

Awaiting Diablo III..

Posted (edited)

  JdeB said:

This is just for debugging ... not permanent !!! Its to check what characters are realy there ...

You could try , as suggested, to replace the CR's and LF's separately:

$newstr = StringReplace($string, @CR, "")

$newstr = StringReplace($newstr , @LF, "")

yeah, that's what I meant :P Edited by theguy0000

The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...