mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Use std::string/string_view versions of starts_with/ends_with where appropriate
The util:: versions of these methods remain as a thin wrapper around them so they can be used with const char* arguments. Otherwise callers have to manually make string_view objects from the input. s Please enter the commit message for your changes. Lines starting
This commit is contained in:
parent
6218643347
commit
a1d121e5aa
17 changed files with 30 additions and 55 deletions
|
@ -533,7 +533,7 @@ void IRC_Analyzer::DeliverStream(int length, const u_char* line, bool orig) {
|
|||
message = message.substr(1); // DCC
|
||||
|
||||
// Check for DCC messages.
|
||||
if ( message.size() > 3 && message.substr(0, 3) == "DCC" ) {
|
||||
if ( message.size() > 3 && message.starts_with("DCC") ) {
|
||||
if ( message[message.size() - 1] == 1 )
|
||||
message = message.substr(0, message.size() - 1);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue