LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing empty strings from string array?

I have a string array that may contain on or more empty string elements. I need to remove the empty strings and shift the remaing elements up.

The example I have attached works fine if only one element is an empty string, but has problems with more than one.

This seem like it should be so easy, its driving me nuts. :0
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 1 of 4
(3,859 Views)
It's a lot easier with newer versions of LabVIEW but try this. It uses a shift register and a build array function to create a new array.
Message 2 of 4
(3,860 Views)
Thank you.

I knew it had to be easier than I was making it. I had not realized the build array function could be used like that. I have only used it to build single dimension arrays from individual elements or multi dimensional arrays from single dimension arrays, never an array and an element.

As for newer versions of LV. I would love to upgrade and have been begging for years. But sorry to say its the corporate bean counters that make the final decisions.
========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 4
(3,859 Views)
Anybody know what new feature in LabView which makes removing empty strings from array?
Or is using case structure within a forloop with shift register the best way to do things?
- crazycliffy
0 Kudos
Message 4 of 4
(3,801 Views)