Name
findfirstof — Finds position of the first matching characters in string
Synopsis
integer
findfirstof
( |
string
STRING
, |
|
string
CHARS
) ; |
Parameters
-
string
STRING
-
string
CHARS
Characters to find
Return
-
integer
the position of the first character in STRING
that is contained in CHARS
.
Description
The findfirstof
function searches string for the first match of any character stored in chars and returns its position.
If no match is found findfirstof returns `nil'.
Usage
findfirstof ("abcdefghi", "cxdv") -> 2
findfirstof ("aaaaa", "z") -> nil