/ ITC Help System
/ Site map
/ NM Tech homepage
Checking the initial characters of a string in Icon
The Icon function ``
is used to find out how many of the initial characters of s
are in the cset c.
- If the first character of s is not in c,
many()'' function fails.
- If at least one character matches, the function returns
the position between the last character that
matches and the first character that doesn't match (see
`How Icon positions are numbered').
For example, this expression
many ( &letters, "12345" )
fails, while this expression
many ( &letters, "abc123" )
returns 4, the position in the string just after its initial letters.
Next: Checking for an initial substring in Icon
See also: Using strings in Icon
Previous: Checking the first character of a string in 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, email@example.com
Last updated: 1996/01/06 21:12:57 UT