summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/UtfUtils.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-24 03:02:43 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-24 03:02:43 +0100
commit83d870e58457a1d335a1d9b9966a6a1887cc297b (patch)
tree72888f88c7728c82f3f6df1f4f70591de15eab36 /dev/kernel/src/UtfUtils.cc
parentab37adbacf0f33845804c788b39680cd754752a8 (diff)
feat! breaking changes on kernel sources.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/kernel/src/UtfUtils.cc')
-rw-r--r--dev/kernel/src/UtfUtils.cc62
1 files changed, 0 insertions, 62 deletions
diff --git a/dev/kernel/src/UtfUtils.cc b/dev/kernel/src/UtfUtils.cc
deleted file mode 100644
index 47ac2729..00000000
--- a/dev/kernel/src/UtfUtils.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ========================================
-
- Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
-
-======================================== */
-
-#include <NeKit/Utils.h>
-
-/// @author Amlal El Mahrouss (amlal@nekernel.org)
-
-namespace Kernel {
-Size urt_string_len(const Utf8Char* str) {
- if (!str) return 0;
-
- SizeT len{0};
-
- while (str[len] != u8'\0') ++len;
-
- return len;
-}
-
-Void urt_set_memory(const voidPtr src, UInt32 dst, Size len) {
- if (!src) return;
-
- Utf8Char* srcChr = reinterpret_cast<Utf8Char*>(src);
- Size index = 0;
-
- while (index < len) {
- srcChr[index] = dst;
- ++index;
- }
-}
-
-Int32 urt_string_cmp(const Utf8Char* src, const Utf8Char* cmp, Size size) {
- if (!src) return 0;
-
- Int32 counter = 0;
-
- for (Size index = 0; index < size; ++index) {
- if (src[index] != cmp[index]) ++counter;
- }
-
- return counter;
-}
-
-Int32 urt_copy_memory(const VoidPtr src, VoidPtr dst, Size len) {
- if (!src) return 0;
- if (!dst) return 0;
-
- Utf8Char* srcChr = reinterpret_cast<Utf8Char*>(src);
- Utf8Char* dstChar = reinterpret_cast<Utf8Char*>(dst);
-
- Size index = 0;
-
- while (index < len) {
- dstChar[index] = srcChr[index];
- ++index;
- }
-
- return index;
-}
-} // namespace Kernel