X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b0655a87f40073577bdb8ba4378e5e683a163d44..324dbfec39cc030027830a100239cb9a4e6624e8:/src/common/wxchar.cpp?ds=sidebyside 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;