LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

remove line feed from a string

Solved!
Go to solution

In the attached VI, I expected my output to be one long string, but instead it is a string with what looks like to be line feeds inserted. That is my output looks like:

 

    xx xx xx xx xx xx xx xx

    xx xx xx xx xx xx xx xx

    xx xx xx xx xx xx xx xx

 

and what I want is:

 

    xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx

 

Is there an easy way to eliminate the linefeeds?

 

Thank you

0 Kudos
Message 1 of 6
(17,903 Views)
Solution
Accepted by topic author chuck72352

Just do a "Search and Replace String" with LF as search string, empty string (or probably a space if needed) as replace string, and replace all instances set to true.

 

Hope this helps

 

Message 2 of 6
(17,899 Views)

A picture is worth thousand words.

 

Remove CRLF.jpg

Message 3 of 6
(17,895 Views)

So then is a snippet worth a thousand thousand words?

 

string replace.png

Stephen Meserve
National Instruments
Message 4 of 6
(17,865 Views)

So I ran into this exact issue yesterday where using a \n or a LF constant didnt work- saved a vi as an example to post up with, then I found this thread and saw that you have to use the EOL constant- the sad part is I apparently kudo'd one of these answers back in october Smiley Tongue

0 Kudos
Message 5 of 6
(17,325 Views)
I right click and change S&R to Regular Expression mode then I choose \v as the search string. This removes all forms of vertical whitespace, be it CR, LF or any combo thereof.
Message 6 of 6
(17,320 Views)