General information
Category:
Coding, syntax & commands
Title:
Need function that checks if chars exist in string ($,inlist
myString='OP101,TH310,XB171'
myDept='TH,BR'
Is there a function that returns .T. if either "TH" or "BR" is in myString?
?INLIST(myString,'TH,BR') returns .F.
?INLIST(myString,'TH','BR') returns .F.
?'TH,BR' $ myString returns .F.
myString is a string, listing (dept code + product code)s, separated by commas. The first 2 chars is Dept code, followed by the product code (example: OP is the dept code, 101 is the product code, etc.)
myDept is a string, listing department codes (separated by commas).
What I'm looking for is a function that will return .T. if any one of the department codes listed in myDept is in myString.
Is there such a thing?
Thanks all!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only