Change to use ToStdStringView() in a few other BIFs

This commit is contained in:
Tim Wojtulewicz 2024-01-16 15:13:29 -07:00 committed by Tim Wojtulewicz
parent c77f8cc898
commit 012acb17cc
2 changed files with 6 additions and 6 deletions

View file

@ -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);