Assuming you already have the table length, in some optoscript…
SetVariableFalse(mystringresult);
For x = 0 to tablelength-1 step 1
If (stringtable[x] == stringtosearch) then
SetVariableTrue(mystringresult);
Endif
Next
If (mystringresult <> 0) then
//do something here if string found
Else
//do something here is string not found
Endif
Recently I had a similar question where the customer had a very large string table to search. While his logic was fast on SoftPAC, he wanted similar logic running on a SNAP-PAC-R1 which was limited in speed and memory.
By storing that data in a text FILE, the search was much faster (e.g. roughly an order of magnitude) and he could also use a much bigger list of strings to search by skipping the string table and just using a file to store those strings!