summaryrefslogtreecommitdiffhomepage
path: root/src/string
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-06-28 15:33:11 -0400
committermidipix <writeonce@midipix.org>2016-06-28 19:41:54 -0400
commit060eadf4e7f81c2d2da4f6c4b2f019186c47ec57 (patch)
tree9e9d639c0782a52e5dd1ecb89854754f97bdbdc5 /src/string
parentc30ed71d8c5375cd63d413c47f7368e2ead104c4 (diff)
downloadntapi-060eadf4e7f81c2d2da4f6c4b2f019186c47ec57.tar.bz2
ntapi-060eadf4e7f81c2d2da4f6c4b2f019186c47ec57.tar.xz
string functions: added __ntapi_tt_strcmp_utf16().
Diffstat (limited to 'src/string')
-rw-r--r--src/string/ntapi_tt_strcmp_utf16.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/string/ntapi_tt_strcmp_utf16.c b/src/string/ntapi_tt_strcmp_utf16.c
new file mode 100644
index 0000000..b083d12
--- /dev/null
+++ b/src/string/ntapi_tt_strcmp_utf16.c
@@ -0,0 +1,18 @@
+/********************************************************/
+/* ntapi: Native API core library */
+/* Copyright (C) 2013--2016 Z. Gilboa */
+/* Released under GPLv2 and GPLv3; see COPYING.NTAPI. */
+/********************************************************/
+
+#include <psxtypes/psxtypes.h>
+#include <ntapi/nt_string.h>
+
+int __cdecl __ntapi_tt_strcmp_utf16(
+ __in const wchar16_t * a,
+ __in const wchar16_t * b)
+{
+ for (; (*a == *b) && *a; a++, b++)
+ (void)0;
+
+ return (int)*a - (int)*b;
+}