HomeManualTopicsTypesSymbols
std_types::set/std::match_back
matches the end of a string with the set's characters
Parameters
- self
- a set of characters
- str
- the string which's end is matched
Result
- len
- 1 if any character in the set matches the end of the string
Description
If the match is unsuccessful, then len is std::undefined.
Use the std::alt-function to construct a set of characters.
Example
$str "[abc]"
$len match_back(alt(')' ']' '}') str)
dump! `len
Output
len: 1
Example
$str "abc"
$len match_back(alt(')' ']' '}') str)
dump! `len
Output
len: <undefined>
Topic
Strings
Implements
| std::match_back |
match the grammar object with the end of the specified string |
See also
| std::alt |
| std::match |
match the grammar object with the start of the specified string |
| std::search |
search from the grammar object from the start or end of the specified string |