mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Rename BroString to zeek::String
This commit is contained in:
parent
a2bc42dd93
commit
736a3f53d4
58 changed files with 346 additions and 339 deletions
15
src/RE.h
15
src/RE.h
|
@ -14,7 +14,8 @@
|
|||
#include <ctype.h>
|
||||
typedef int (*cce_func)(int);
|
||||
|
||||
ZEEK_FORWARD_DECLARE_NAMESPACED(BroString, zeek);
|
||||
namespace zeek { class String; }
|
||||
using BroString [[deprecated("Remove in v4.1. Use zeek::String instead.")]] = zeek::String;
|
||||
|
||||
class CCL;
|
||||
class NFA_Machine;
|
||||
|
@ -82,7 +83,7 @@ public:
|
|||
void ConvertCCLs();
|
||||
|
||||
bool MatchAll(const char* s);
|
||||
bool MatchAll(const zeek::BroString* s);
|
||||
bool MatchAll(const zeek::String* s);
|
||||
|
||||
// Compiles a set of regular expressions simultaniously.
|
||||
// 'idx' contains indizes associated with the expressions.
|
||||
|
@ -95,10 +96,10 @@ public:
|
|||
// if the pattern matches empty strings, matching continues
|
||||
// in an attempt to match at least one character.
|
||||
int Match(const char* s);
|
||||
int Match(const zeek::BroString* s);
|
||||
int Match(const zeek::String* s);
|
||||
|
||||
int LongestMatch(const char* s);
|
||||
int LongestMatch(const zeek::BroString* s);
|
||||
int LongestMatch(const zeek::String* s);
|
||||
int LongestMatch(const u_char* bv, int n);
|
||||
|
||||
EquivClass* EC() { return &equiv_class; }
|
||||
|
@ -192,7 +193,7 @@ public:
|
|||
// Returns true if s exactly matches the pattern, false otherwise.
|
||||
bool MatchExactly(const char* s)
|
||||
{ return re_exact->MatchAll(s); }
|
||||
bool MatchExactly(const zeek::BroString* s)
|
||||
bool MatchExactly(const zeek::String* s)
|
||||
{ return re_exact->MatchAll(s); }
|
||||
|
||||
// Returns the position in s just beyond where the first match
|
||||
|
@ -201,14 +202,14 @@ public:
|
|||
// in an attempt to match at least one character.
|
||||
int MatchAnywhere(const char* s)
|
||||
{ return re_anywhere->Match(s); }
|
||||
int MatchAnywhere(const zeek::BroString* s)
|
||||
int MatchAnywhere(const zeek::String* s)
|
||||
{ return re_anywhere->Match(s); }
|
||||
|
||||
// Note: it matches the *longest* prefix and returns the
|
||||
// length of matched prefix. It returns -1 on mismatch.
|
||||
int MatchPrefix(const char* s)
|
||||
{ return re_exact->LongestMatch(s); }
|
||||
int MatchPrefix(const zeek::BroString* s)
|
||||
int MatchPrefix(const zeek::String* s)
|
||||
{ return re_exact->LongestMatch(s); }
|
||||
int MatchPrefix(const u_char* s, int n)
|
||||
{ return re_exact->LongestMatch(s, n); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue