LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

match true/false string

can anyone give me an example of match true/false string function?
0 Kudos
Message 1 of 4
(4,103 Views)
Not sure what you mean; if you just want to know if one string is identical to the other wire them into the Equal? function from the comparison palette...If you want to know if one string matches a part of the other use the String -> Match pattern function e.g. and test if the offset output is >= 0 (will return -1 if no match was found)...
0 Kudos
Message 2 of 4
(4,103 Views)
> can anyone give me an example of match true/false string function?

If you are talking about the Additional String Functions palette and the
Match True/False String function, then I only know that that node is
quite old and was placed on that palette for compatibility with older
versions of LV. Playing with the node in LV6.1, it doesn't make
complete sense to me. I'll ask some of the LV2 era guys and see if they
believe it is supposed to work this way. In the meantime, if you can
find documentation on LV2, possibly even LV3 or LV4, you will likely
find the documentation on that node complete enough to know whether the
node works correctly.

Greg McKaskle
0 Kudos
Message 3 of 4
(4,103 Views)
>> can anyone give me an example of match true/false string function?
>

Did my homework, and assuming this is the node you were talking about,
it uses the input called string as the body of text to search through.
The strings called True String and False String are the tokens that are
searched for. The Boolean output indicates whether the True or False
string matched string.

Of course, what happens when both match, or when neither matches?
Apparently the True string gets searched for first, so if both True and
False strings are the same, and match, then True is output. If neither
matches, it is only evident by looking at the output string. When
neither matches, the output string is equal to the input string. In all
other cases, the outp
ut string is the remainder after the match.

When should you use this? Personally I've never needed to use it. If
you see a need to look for one of two tokens, this might be handy. The
node next to it searches for N tokens and returns -1 when none of the
array matches and it is more clear the order that the tokens are
searched for, so if I were to pick between these nodes, this seems like
the clear winner.

Greg McKaskle
0 Kudos
Message 4 of 4
(4,103 Views)