summaryrefslogtreecommitdiffhomepage
path: root/src/string/ntapi_tt_memcpy_utf16.c
blob: 70829e66dd359cf4c204ab328e8e4150a3face0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/********************************************************/
/*  ntapi: Native API core library                      */
/*  Copyright (C) 2013--2017  Z. Gilboa                 */
/*  Released under GPLv2 and GPLv3; see COPYING.NTAPI.  */
/********************************************************/

#include <psxtypes/psxtypes.h>
#include <pemagine/pemagine.h>

wchar16_t * __cdecl __ntapi_tt_memcpy_utf16(
	__in	wchar16_t *	dst,
	__in	wchar16_t *	src,
	__in	size_t		bytes)
{
	wchar16_t *	wch_cap;
	wchar16_t *	wch_ret;

	wch_cap = (wchar16_t *)((uintptr_t)src + bytes);
	wch_ret = dst;

	while (src < wch_cap) {
		*dst = *src;
		src++;
		dst++;
	}

	return wch_ret;
}