aboutsummaryrefslogtreecommitdiffstats
path: root/memory/wmemmove.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory/wmemmove.c')
-rw-r--r--memory/wmemmove.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/memory/wmemmove.c b/memory/wmemmove.c
new file mode 100644
index 0000000..1d30daf
--- /dev/null
+++ b/memory/wmemmove.c
@@ -0,0 +1,12 @@
+#include "memory.h"
+
+wchar_t *wmemmove(wchar_t *restrict destination, wchar_t const *restrict source,
+ size_t count)
+{
+ if (destination < source)
+ wmemcpy(destination, source, count);
+ else
+ for (size_t i = count; i-- > 0;)
+ destination[i] = source[i];
+ return destination;
+}