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.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);