summaryrefslogtreecommitdiffhomepage
path: root/dev/kernel/src/UtfUtils.cc
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-05-29 10:51:53 +0200
committerGitHub <noreply@github.com>2025-05-29 10:51:53 +0200
commit5c0bb7ee7b1b0fee02cc179fb21f4c57a61d6c2d (patch)
treecb17577bcdc9714c97a84ce417a075117097f146 /dev/kernel/src/UtfUtils.cc
parentd608230b1350b064ceb01e6572519b108f6139b0 (diff)
parent3167f59dbb401d6a79b1524537e04218baf49ee3 (diff)
Merge pull request #32 from nekernel-org/dev
0.0.2e3
Diffstat (limited to 'dev/kernel/src/UtfUtils.cc')
-rw-r--r--dev/kernel/src/UtfUtils.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/dev/kernel/src/UtfUtils.cc b/dev/kernel/src/UtfUtils.cc
index 11d7471a..ae17aed7 100644
--- a/dev/kernel/src/UtfUtils.cc
+++ b/dev/kernel/src/UtfUtils.cc
@@ -4,7 +4,7 @@
------------------------------------------- */
-#include <NewKit/Utils.h>
+#include <NeKit/Utils.h>
namespace Kernel {
Size urt_string_len(const Utf8Char* str) {
@@ -25,7 +25,17 @@ Void urt_set_memory(const voidPtr src, UInt32 dst, Size len) {
}
}
-Int urt_copy_memory(const voidPtr src, voidPtr dst, Size len) {
+Int32 rt_string_cmp(const Utf8Char* src, const Utf8Char* cmp, Size size) {
+ Int32 counter = 0;
+
+ for (Size index = 0; index < size; ++index) {
+ if (src[index] != cmp[index]) ++counter;
+ }
+
+ return counter;
+}
+
+Int urt_copy_memory(const VoidPtr src, VoidPtr dst, Size len) {
Utf8Char* srcChr = reinterpret_cast<Utf8Char*>(src);
Utf8Char* dstChar = reinterpret_cast<Utf8Char*>(dst);