News flash: I'm going to Australia in February, so this Web site may be switched off at any time.


Checking initial string characters in Icon

The Icon function ``many(c, s)'' is used to find out how many of the initial characters of s are in the cset c.

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
See also: Using the Icon programming language
Previous: Checking the first character of a string in Icon

John W. Shipman, john@nmt.edu