ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

取消
显示结果 
搜索替代 
您的意思是: 

delete white spaces between two strings

hi!
How do I remove white spaces between two strings. I have attached file for reference.
 
Thanks
0 项奖励
1 条消息(共 10 条)
6,075 次查看
There is a trim whites spaces vi
- there is always an easy way, but it is always the hardest to find
0 项奖励
2 条消息(共 10 条)
6,065 次查看

Hi!

Thanks for your repy.

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

 

0 项奖励
3 条消息(共 10 条)
6,055 次查看
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 项奖励
4 条消息(共 10 条)
6,047 次查看
You should use that vi for every line and if one line consists of only \r\n, delete it.
0 项奖励
5 条消息(共 10 条)
6,043 次查看

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 项奖励
6 条消息(共 10 条)
6,033 次查看
Hi bhotu,
can you please upload your vi, so that we can see which characters are in your string?
Mike
0 项奖励
7 条消息(共 10 条)
6,031 次查看
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 项奖励
8 条消息(共 10 条)
6,021 次查看
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 项奖励
9 条消息(共 10 条)
6,004 次查看

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 项奖励
10 条消息(共 10 条)
5,990 次查看