Removed std prefix

This commit is contained in:
Bob Polis 2021-07-02 11:38:57 +02:00
parent 884bbfc681
commit 0afde06074

View File

@ -106,16 +106,16 @@ map<string, string> 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<string> path_components {sc::split(path, "/")};