Jump to content

Remove linebreaks from text?


Recommended Posts

Hello,

i'm actually need to remove alle linebreaks from a string. The string contains data from an editbox.

My problem: If i output the string via msgbox(), there's no "character" for the linebreak (like \n or @CRLF).

I tried to remove this break with StringSplitCR (nothing happens), and tried to replace @CRLF with StringReplace($str, @crlf, "") - nothing happens.

What can i do?

The editbox-text:

10.10.10.10,

12.12.12.12,

13.13.13.13

$temp = GUICtrlRead($i_camips)

StringReplace($temp, @crlf, "")

MsgBox(0, "", $temp)

Attention! English noob ^^

Link to comment
Share on other sites

According to your code above, it may actually be working, except you don't see it because you are rereading the variable before the change.

$string=StringReplace($temp, @crlf, "")

MsgBox(0, "", $string)

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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