find_first_of
Method of string.
Overloads
| Name | Description |
|---|---|
find_first_of(const string f, integer pos) -> integer | Finds the first occurrence of any character from the specified substring starting from the given position. |
find_first_of(string list) -> Object | Finds the first character contained in a character list. |
find_first_of(const string f, integer pos) -> integer
Finds the first occurrence of any character from the specified substring starting from the given position.
Parameters
- f: The substring containing characters to search for.
- pos: The position to start the search from.
find_first_of(string list) -> Object
Finds the first character contained in a character list.
Parameters
- list: The characters to find.
Returns
The match position, or the underlying not-found value.
Example
"abab".find_first_of("bec")
//-> 1