wxStrncmp implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2828 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven
1999-06-19 04:32:35 +00:00
parent 101f488cf5
commit a5e0b1e83d

View File

@@ -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;