summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/UtfUtils.cc
diff options
context:
space:
mode:
Diffstat (limited to 'dev/kernel/src/UtfUtils.cc')
-rw-r--r--dev/kernel/src/UtfUtils.cc12
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);