summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc/utility.cpp
diff options
context:
space:
mode:
authorfireice-uk <fireice-uk@users.noreply.github.com>2017-10-27 20:37:12 +0100
committerGitHub <noreply@github.com>2017-10-27 20:37:12 +0100
commitc192b97b67bf648540bf058f21b7873bfe886a82 (patch)
treefe71edd305f523021c9038dab5595551c7e4c7e2 /xmrstak/misc/utility.cpp
parent91b307859ea97cc1abdb17da01b94919d3521803 (diff)
parent0117ed609e69af977fabaf9c28bbf8cf1300ee89 (diff)
downloadxmr-stak-c192b97b67bf648540bf058f21b7873bfe886a82.zip
xmr-stak-c192b97b67bf648540bf058f21b7873bfe886a82.tar.gz
Merge pull request #67 from psychocrypt/topic-aeon2
add Aeon support
Diffstat (limited to 'xmrstak/misc/utility.cpp')
-rw-r--r--xmrstak/misc/utility.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/xmrstak/misc/utility.cpp b/xmrstak/misc/utility.cpp
new file mode 100644
index 0000000..3b1369a
--- /dev/null
+++ b/xmrstak/misc/utility.cpp
@@ -0,0 +1,21 @@
+#include <string>
+#include <algorithm>
+
+
+namespace xmrstak
+{
+ bool strcmp_i(const std::string& str1, const std::string& str2)
+ {
+ if(str1.size() != str2.size())
+ return false;
+ else
+ return (str1.empty() | str2.empty()) ?
+ false :
+ std::equal(str1.begin(), str1.end(),str2.begin(),
+ [](char c1, char c2)
+ {
+ return ::tolower(c1) == ::tolower(c2);
+ }
+ );
+ }
+} // namepsace xmrstak
OpenPOWER on IntegriCloud