Delete blank line of text

Dman

Active Member
Licensed User
Longtime User
I have an edittext that contains lines like this when retrieved from a db field:

Line1

Line2

Line3

I need to get rid of the blank lines and have it look like this

Line1
Line2
Line3

I am obviously having a major brain fart and can't for the life of me figure out how to do it. I must be tired....
 
Last edited:

mangojack

Expert
Licensed User
Longtime User
Dman .. This is 1 multiline edittext box you are referring to ?

There is no linefeed in the db Data ?
Maybe post some code .. that might help

Cheers mj
 
Upvote 0

Jost aus Soest

Active Member
Licensed User
Longtime User
Replace the CRLFs!

You could remove the empty lines with code like this:
B4X:
txt.Text = txt.Text.Replace(CRLF & CRLF, CRLF)
Where txt is your EditText box.
 
Last edited:
Upvote 0
Top