LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delete white spaces between two strings

hi!
How do I remove white spaces between two strings. I have attached file for reference.
 
Thanks
0 Kudos
Message 1 of 10
(4,455 Views)
There is a trim whites spaces vi
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 2 of 10
(4,445 Views)

Hi!

Thanks for your repy.

I have tried trim white spaces fn. but it didn't work

 

0 Kudos
Message 3 of 10
(4,435 Views)
Hi bhotu,
use the search and replace function with "true" for replace all. Switch you original string control to "CodeDisplay" to find out which character you have to replace.
Mike
0 Kudos
Message 4 of 10
(4,427 Views)
You should use that vi for every line and if one line consists of only \r\n, delete it.
0 Kudos
Message 5 of 10
(4,423 Views)

Hi! Pnt

Thanks

But I don't want to replace anything. Just I want to delete white spaces. I have used trim white spaces fn. It works. But it printed output in single line. I have attached file for your reference

0 Kudos
Message 6 of 10
(4,413 Views)
Hi bhotu,
can you please upload your vi, so that we can see which characters are in your string?
Mike
0 Kudos
Message 7 of 10
(4,411 Views)
You could try to use a compare statement to see if a line is empty, anddelete the ones that are, or do the opposite for lines that have values other than space or null. This would delete the empty lines, which is different than trimming the white spaces
- there is always an easy way, but it is always the hardest to find
0 Kudos
Message 8 of 10
(4,401 Views)
You first need to define what you consider to be "whitespace". Is it just a space? Is it spaces and linefeeds? What about carriage returns? Tabs? Anything non-alphabetic and/or non-numeric?

As mentioned previously, the Search and Replace String can be used to delete characters by wiring an empty string to the replace string input. The following, for example, will delete all spaces:



If you need to delete other whitespace characters, just call it again on the resulting string.


Message Edited by smercurio_fc on 06-02-2008 09:25 AM
0 Kudos
Message 9 of 10
(4,384 Views)

Hi! Beaton,

Thanks for your prompt reply.

finally i did it and it works. I have used trim white spaces  function and  search and replace string fn. with end of line. it works.

Thanks

 

 

 

 

0 Kudos
Message 10 of 10
(4,370 Views)