it often occurs (at least in my own and in Artur's hansl programming)
that you want to check whether a certain string variable contains some
shorter string. For example whether variable 's1' contains the string
"USA", without being necessarily exactly equal to "USA".
Currently to my knowledge this can/must be done using the strstr()
function, either like this (producing non-negative integer output):
or like this:
strstr(s1, "USA") != ""
I find both variants relatively clumsy, so I'm asking for syntactic
sugar which would be equivalent to the second expression above. For
example an 'instring()' function that would be loosely analogous to the
inbundle() or inlist() functions.
So the above example would simply be rewritten as:
But maybe Jack or somebody else have an alternative suggestions what
could be done instead with existing hansl constructs.