News flash: I'm going to Australia in February, so this Web site may be switched off at any time.
If you want to know whether a particular target string t occurs anywhere within a string s, use the function
find ( t, s )
find()
'' function fails.
find ( t, s )
''
generates all the locations where t is
found (see
using generators in Icon).
For example, the expression
find ( "honest", "politician" )fails, while the expression
every write ( find ( "y", "syzygy" ) ) );writes three lines containing the numbers 2, 4, and 6 (the positions of ``
y
'' characters within the string "syzygy"
).
john@nmt.edu