LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare between strings

Hi,
simple question :
I can't find a function that parallel to strcmp in C language .
How can i compare between two strings ?
 
Thanks for your help .
0 Kudos
Message 1 of 11
(5,571 Views)
Which kind of output you want? (I don't remember what strcmp actually does)
0 Kudos
Message 2 of 11
(5,573 Views)
Hi,
true / false OR 0 - if match != 0 if it doesn't match .
0 Kudos
Message 3 of 11
(5,567 Views)
Hello asaf,

there's a hugh amount of comparison functions in the comparison palette. Just try them!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 11
(5,564 Views)
If all that you want to know is if two different strings are equal, use the Equal? function.
Message 5 of 11
(5,560 Views)

Thanks,

I though it is only arithmetic comparisson .

0 Kudos
Message 6 of 11
(5,553 Views)
Hi,

Under Libraries<< Formatting and I/O Library<< String Manipulation there is a 'CompareStrings' function that will do the comparison you want and you can even set it to be case sensitive or not.

Good luck,

TT
Applications Engineer
National Instruments
0 Kudos
Message 7 of 11
(5,536 Views)
Which of course is in CVI but since the question was made to the LabVIEW forum, I think the poster was asking for the LabVIEW equivalentSmiley Wink.
0 Kudos
Message 8 of 11
(5,530 Views)

Hai,

        I would like to compare string in two files and extract the word which is same in other one file.

       please mail me if you can help me.

       siva_shiva@sify.com

0 Kudos
Message 9 of 11
(5,467 Views)
You can compare, strings, numerics, arrays and even clusters
 
 
 
 
0 Kudos
Message 10 of 11
(5,380 Views)