Purpose Check whether a
given string is a substring of another string
Solution 1
For case
insensitive search, use the "search=" option of the "Set" command:
GuiXT
// Sample string
Set V[title] "Create Consignment Pick-Up: Overview"
Set V[x] "&V[title]" search="consignment"
if Q[ok]
Message "yes"
endif
Solution
2
For case
sensitive search, use the "ReplaceText" command for a text
variable:
GuiXT
// Sample string
Set V[title] "Create Consignment Pick-Up: Overview"
Set text[x] "&V[title]"
ReplaceText "x" from="consignment" to="consignment"
if Q[ok]
Message """consignment"" found"
else
Message """consignment"" not found"
endif
GuiXT
Set text[x] "&V[title]"
ReplaceText "x" from="Consignment" to="Consignment"
if Q[ok]
Message """Consignment"" found"
else
Message """Consignment"" not found"
endif