From 0afde060746848d986fa894c5ef5111271da329f Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Fri, 2 Jul 2021 11:38:57 +0200 Subject: [PATCH] Removed std prefix --- string_utils.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/string_utils.cpp b/string_utils.cpp index b2c5722..53713c5 100644 --- a/string_utils.cpp +++ b/string_utils.cpp @@ -106,16 +106,16 @@ map sc::parse_ini_file(const string& path) return result; } -void sc::replace_all(const std::string& what, const std::string& replacement, std::string& target) { - std::string::size_type pos = std::string::npos; - std::string::size_type from = 0; +void sc::replace_all(const string& what, const string& replacement, string& target) { + string::size_type pos = string::npos; + string::size_type from = 0; do { pos = target.find(what, from); - if (pos != std::string::npos) { + if (pos != string::npos) { target.replace(pos, what.length(), replacement); from = pos + replacement.length(); } - } while (pos != std::string::npos); + } while (pos != string::npos); } string sc::str_replace(const string& what, const string& replacement, const string& target) @@ -133,9 +133,9 @@ string sc::str_replace(const string& what, const string& replacement, const stri return result; } -wstring sc::replace_all(const std::wstring& what, - const std::wstring& replacement, - const std::wstring& target) +wstring sc::replace_all(const wstring& what, + const wstring& replacement, + const wstring& target) { wstring term {target}; wstring::size_type pos = wstring::npos; @@ -150,7 +150,7 @@ wstring sc::replace_all(const std::wstring& what, return term; } -void sc::create_dir(const std::string &path, int mode) +void sc::create_dir(const string &path, int mode) { string dir; vector path_components {sc::split(path, "/")};