/ ITC Help System
/ Site map
/ NM Tech homepage
Checking the first character of a string in Icon
You can check to see if a given string starts with a particular
character or type of character using the Icon function
any ( c, s )''.
- The first argument c must be a cset (see
`Using csets to describe sets of characters in Icon').
- The second argument s is the string to be checked.
- If the first character of s is in the cset c,
any()'' function succeeds and produces the
position after the matched character, which will be 2 in this case
(the position of the second character).
- If the first character of s is not
in the cset c, the ``
any()'' function fails.
Next: Checking the initial characters of a string in Icon
See also: Using strings in Icon
Previous: Analyzing strings with Icon
to help pages
New Mexico Tech Information Technology and Communications: Help System
To report a problem: File a ticket
Send mail to the User consultant
on duty or call them at 575-835-5437
About New Mexico Tech
John Shipman, firstname.lastname@example.org
Last updated: 1996/10/29 23:55:10 UT