mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 10:38:20 +00:00
Change to use ToStdStringView() in a few other BIFs
This commit is contained in:
parent
c77f8cc898
commit
012acb17cc
2 changed files with 6 additions and 6 deletions
|
@ -1247,8 +1247,8 @@ function reverse%(str: string%) : string
|
|||
##
|
||||
function count_substr%(str: string, sub: string%) : count
|
||||
%{
|
||||
string s = str->ToStdString();
|
||||
string sub_s = sub->ToStdString();
|
||||
auto s = str->ToStdStringView();
|
||||
auto sub_s = sub->ToStdStringView();
|
||||
|
||||
size_t count = 0;
|
||||
size_t pos = s.find(sub_s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue