From a5e0b1e83d016690d96bea389ad058d0ee3c4a69 Mon Sep 17 00:00:00 2001
From: Ove Kaaven <ovek@arcticnet.no>
Date: Sat, 19 Jun 1999 04:32:35 +0000
Subject: [PATCH] wxStrncmp implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 src/common/wxchar.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp
index 23bc691780..db8b5d651e 100644
--- a/src/common/wxchar.cpp
+++ b/src/common/wxchar.cpp
@@ -234,6 +234,16 @@ WXDLLEXPORT wxChar * wxStrncat(wxChar *dest, const wxChar *src, size_t n)
   return ret;
 }
 
+WXDLLEXPORT int wxStrncmp(const wxChar *s1, const wxChar *s2, size_t n)
+{
+  while (n && (*s1 == *s2) && *s1) n--, s1++, s2++;
+  if (n) {
+    if ((wxUChar)*s1 < (wxUChar)*s2) return -1;
+    if ((wxUChar)*s1 > (wxUChar)*s2) return 1;
+  }
+  return 0;
+}
+
 WXDLLEXPORT wxChar * wxStrncpy(wxChar *dest, const wxChar *src, size_t n)
 {
   wxChar *ret = dest;
-- 
2.47.2