mirror of
https://github.com/zeek/zeek.git
synced 2025-10-05 16:18:19 +00:00
Add ToStdString and ToStdStringView to ZeekString
This commit is contained in:
parent
f96ce6727f
commit
d570486f36
3 changed files with 17 additions and 4 deletions
|
@ -91,6 +91,17 @@ public:
|
|||
*/
|
||||
std::pair<const char*, size_t> CheckStringWithSize() const;
|
||||
|
||||
/**
|
||||
* Returns the string data as a std::string. This makes a copy of the
|
||||
* string data.
|
||||
*/
|
||||
std::string ToStdString() const;
|
||||
|
||||
/**
|
||||
* Returns the string data as a std::string_view.
|
||||
*/
|
||||
std::string_view ToStdStringView() const;
|
||||
|
||||
enum render_style {
|
||||
ESC_NONE = 0,
|
||||
ESC_ESC = (1 << 1), // '\' -> "\\"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue