07-15-2013 09:55 PM
Hi everyone,
I was wondering if there is any VI that does the function of searching a particular Substring in a string and gives a Boolean ( True / False ) as a output. If found, give a true. Cannot be found, give a false.
Thanks!~
Solved! Go to Solution.
07-15-2013 10:08 PM - edited 07-15-2013 10:10 PM
You'll not get directly a BOOLEAN output, but for this sort of requirements there are different functions available and each of these functions give an output called 'Offset of Match' (or 'Offset Past Match' in some functions).
Now based on the requirement you can select anyone of the following:
1. Search/Split String: (Simplest function and fastest)
2. Match Pattern: (Powerful and slower)
3. Match Regular Expression: (Powerful most and slowest)
Now while using any of these functions if this particular output 'Offset of Match' (or 'Offset Past Match' in some functions) gives '-1' (negative 1) it means that the substring (token) is not found in the main string, so a simple check will give you, your desired functionality.