|
libabigail
|
Namespace for regex types and functions. More...
Classes | |
| struct | escape |
| A class to hold a reference to a string to regex escape. More... | |
| struct | regex_t_deleter |
| A delete functor for a shared_ptr of regex_t. More... | |
Typedefs | |
| typedef std::shared_ptr< regex_t > | regex_t_sptr |
| A convenience typedef for a shared pointer of regex_t. More... | |
Functions | |
| regex_t_sptr | compile (const std::string &str) |
| Compile a regex from a string. More... | |
| std::string | generate_from_strings (const std::vector< std::string > &strs) |
| Generate a regex pattern equivalent to testing set membership. More... | |
| bool | match (const regex_t_sptr &r, const std::string &str) |
| See if a string matches a regex. More... | |
| std::ostream & | operator<< (std::ostream &os, const escape &esc) |
| Escape regex special charaters in input string. More... | |
Namespace for regex types and functions.
| typedef std::shared_ptr< regex_t > regex_t_sptr |
| regex_t_sptr compile | ( | const std::string & | str | ) |
Compile a regex from a string.
The result is held in a shared pointer. This will be null if regex compilation fails.
| str | the string representation of the regex. |
Definition at line 111 of file abg-regex.cc.
| std::string generate_from_strings | ( | const std::vector< std::string > & | strs | ) |
Generate a regex pattern equivalent to testing set membership.
A string will match the resulting pattern regex, if and only if it was present in the vector.
| strs | a vector of strings |
Definition at line 88 of file abg-regex.cc.
| bool match | ( | const regex_t_sptr & | r, |
| const std::string & | str | ||
| ) |
See if a string matches a regex.
| r | a shared pointer holder of a compiled regex object. |
| str | a string. |
Definition at line 127 of file abg-regex.cc.
| std::ostream & operator<< | ( | std::ostream & | os, |
| const escape & | esc | ||
| ) |
Escape regex special charaters in input string.
| os | the output stream being written to. |
| esc | the regex_escape object holding a reference to the string needing to be escaped. |
Definition at line 64 of file abg-regex.cc.