diff --git a/base/stringutil.cpp b/base/stringutil.cpp index 414fe117c9..c1d5ed35e6 100644 --- a/base/stringutil.cpp +++ b/base/stringutil.cpp @@ -233,4 +233,10 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st pos += dest.size(); } return result; +} + +int strcmpIgnore(std::string str1, std::string str2, std::string ignorestr1, std::string ignorestr2) { + str1 = ReplaceAll(str1, ignorestr1, ignorestr2); + str2 = ReplaceAll(str2, ignorestr1, ignorestr2); + return strcmp(str1.c_str(),str2.c_str()); } \ No newline at end of file diff --git a/base/stringutil.h b/base/stringutil.h index 97fc6051ae..3cd9a9f3d4 100644 --- a/base/stringutil.h +++ b/base/stringutil.h @@ -133,6 +133,9 @@ void SplitString(const std::string& str, const char delim, std::vector static std::string ValueToString(const N value) {