mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:17:35 +00:00
LibC: Implement wmemmove
This commit is contained in:
parent
fa1208edfd
commit
05b283f552
3 changed files with 42 additions and 0 deletions
|
@ -402,4 +402,19 @@ wchar_t* wmemset(wchar_t* wcs, wchar_t wc, size_t n)
|
|||
|
||||
return wcs;
|
||||
}
|
||||
|
||||
wchar_t* wmemmove(wchar_t* dest, const wchar_t* src, size_t n)
|
||||
{
|
||||
if (dest > src) {
|
||||
for (size_t i = 1; i <= n; i++) {
|
||||
dest[n - i] = src[n - i];
|
||||
}
|
||||
} else if (dest < src) {
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
dest[i] = src[i];
|
||||
}
|
||||
}
|
||||
|
||||
return dest;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue