summaryrefslogtreecommitdiffhomepage
path: root/FoundationEx/Text.h
diff options
context:
space:
mode:
Diffstat (limited to 'FoundationEx/Text.h')
-rw-r--r--FoundationEx/Text.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/FoundationEx/Text.h b/FoundationEx/Text.h
index 0ade946..736c6b9 100644
--- a/FoundationEx/Text.h
+++ b/FoundationEx/Text.h
@@ -15,10 +15,12 @@
#define Text_h
#include <atomic>
+#include <cstring>
#include <ostream>
-#include <string.h>
-#include <windows.h>
+#ifndef _WIN32
+#include <strings.h>
+#endif
// +-------------------------------------------------------------------+
@@ -138,7 +140,11 @@ inline int Text::compare(const char* s) const
if (rep->sensitive)
return strcmp(sym, s);
else
+#ifdef _WIN32
return _stricmp(sym, s);
+#else
+ return strcasecmp(sym, s);
+#endif
}
inline int Text::compare(const Text& s) const
@@ -146,7 +152,11 @@ inline int Text::compare(const Text& s) const
if (rep->sensitive && s.rep->sensitive)
return strcmp(sym, s.sym);
else
+#ifdef _WIN32
return _stricmp(sym, s.sym);
+#else
+ return strcasecmp(sym, s.sym);
+#endif
}
// +-------------------------------------------------------------------+