HomeManualTopicsTypesSymbols
std_types::set/std::search
searches for one of the alternatives from the start or the end of a string
Parameters
- self
- a set of characters
- stream
- the string to search in
- nth (default: 1)
- search for the nth occurrence; negative value search backwards
Results
- pos
- the position of the first occurrence of a matching character
- len
- 1 if successful
Description
If a matching character is not found, then pos and len are std::undefined.
Example
println! "std_types::positive_integer/std::minus" .before. alt('.' '/')
Output
std_types::positive_integer
Topic
Strings
Implements
std::search |
search from the grammar object from the start or end of the specified string |
See also
std::match |
match the grammar object with the start of the specified string |
std::match_back |
match the grammar object with the end of the specified string |