Blob Blame History Raw
/********************************************************/
/*  ntapi: Native API core library                      */
/*  Copyright (C) 2013--2017  Z. Gilboa                 */
/*  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  */
/********************************************************/

#include <psxtypes/psxtypes.h>
#include <ntapi/nt_string.h>

int __cdecl __ntapi_tt_strncmp_utf16(
	__in	const wchar16_t * a,
	__in	const wchar16_t * b,
	__in	size_t		  n)
{
	if ((n /= sizeof(wchar16_t)) == 0)
		return 0;

	for (--n; n && (*a == *b) && *a; a++, b++)
		n--;

	return (int)*a - (int)*b;
}