mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
17 lines
479 B
C++
17 lines
479 B
C++
// See the file "COPYING" in the main distribution directory for copyright.
|
|
|
|
#define binpac_regex_h
|
|
|
|
#include "binpac_bytestring.h"
|
|
|
|
#include <cstdlib>
|
|
|
|
namespace binpac {
|
|
|
|
std::string std_string(bytestring const* s) { return {(const char*)s->begin(), (const char*)s->end()}; }
|
|
|
|
int bytestring_to_int(bytestring const* s) { return atoi((const char*)s->begin()); }
|
|
|
|
double bytestring_to_double(bytestring const* s) { return atof((const char*)s->begin()); }
|
|
|
|
} // namespace binpac
|