diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-11 13:04:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-11 13:04:22 +0200 |
| commit | 57d040e3e6b6d0257c0ba5a914396520b18d9d87 (patch) | |
| tree | 78be4974d8a24e983034b0962ac5435f1b1d0b53 /dev/kernel/src/UtfUtils.cc | |
| parent | 7690c1976b3127e17370708aef47ba3f18f3b8c2 (diff) | |
| parent | f775566da3cf4f8e3ffd4ca6dfe0a3c7776c3b35 (diff) | |
Merge pull request #30 from nekernel-org/dev0.0.2e2
0.0.2e2
Diffstat (limited to 'dev/kernel/src/UtfUtils.cc')
| -rw-r--r-- | dev/kernel/src/UtfUtils.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/dev/kernel/src/UtfUtils.cc b/dev/kernel/src/UtfUtils.cc index 079efb7b..11d7471a 100644 --- a/dev/kernel/src/UtfUtils.cc +++ b/dev/kernel/src/UtfUtils.cc @@ -10,11 +10,21 @@ namespace Kernel { Size urt_string_len(const Utf8Char* str) { SizeT len{0}; - while (str[len] != u'\0') ++len; + while (str[len] != u8'\0') ++len; return len; } +Void urt_set_memory(const voidPtr src, UInt32 dst, Size len) { + Utf8Char* srcChr = reinterpret_cast<Utf8Char*>(src); + Size index = 0; + + while (index < len) { + srcChr[index] = dst; + ++index; + } +} + Int urt_copy_memory(const voidPtr src, voidPtr dst, Size len) { Utf8Char* srcChr = reinterpret_cast<Utf8Char*>(src); Utf8Char* dstChar = reinterpret_cast<Utf8Char*>(dst); |
