LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the search 1D array function case insensitive for string array

Solved!
Go to solution

I know this thread is dead for 9yrs, but I was not satisfied with the answer.

 

See attached solution using OpenG tools

 

0 Kudos
Message 11 of 13
(429 Views)

Since you revived the thread, I think most users should prefer the earlier approaches over yours.  Sorting a string array can be expensive and is generally not needed or even particularly helpful to the goal of string matching.

 

(This is distinct from the way that maintaining an array in sorted order might be useful to support lots of lookups using a binary search algorithm.)

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 12 of 13
(419 Views)

@Kevin_Price wrote:

(This is distinct from the way that maintaining an array in sorted order might be useful to support lots of lookups using a binary search algorithm.)


Variant Attributes does this for you!

 

As far as the searching in a text array, I have a tendency of using Trim Whitespace followed by a To Upper.  I trim the whitespace because I have seen too many users accidentally add in a space or end of line to the input and then complain to me the strings won't match.  To Upper or To Lower: you can use either one as long as you are consistent.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 13 of 13
(412 Views)