mirror of
https://github.com/zeek/zeek.git
synced 2025-10-06 00:28:21 +00:00
Val: Switch TablePatternMatcher to std::string_view
...and add TableVal::LookupPattern(std::string_view sv).
This commit is contained in:
parent
dce51b99e5
commit
dad5ccd622
2 changed files with 18 additions and 9 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <sys/types.h> // for u_char
|
||||
#include <array>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
@ -898,6 +900,11 @@ public:
|
|||
// Causes an internal error if called for any other kind of table.
|
||||
VectorValPtr LookupPattern(const StringValPtr& s);
|
||||
|
||||
// For a table[pattern], return a vector of all yields matching
|
||||
// the given string.
|
||||
// Causes an internal error if called for any other kind of table.
|
||||
VectorValPtr LookupPattern(std::string_view sv);
|
||||
|
||||
// For a table[pattern] or set[pattern], returns True if any of the
|
||||
// patterns in the index matches the given string, else False.
|
||||
// Causes an internal error if called for any other kind of table.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue