summaryrefslogtreecommitdiffhomepage
path: root/DDK/KernelString.c
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-28 11:52:48 +0200
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-05-28 11:52:48 +0200
commit8f262d685126a9a9f68beb6d4002ba30bebae401 (patch)
tree6b4931b8e647bb4b9a8144ce385850eedb086bd9 /DDK/KernelString.c
parent9db58da40cfcb6643412bfae25aefc0cd1077f9d (diff)
MHR-23: Improve scheduler code: Dont use 39, write kErrorProcessFault instead.
MHR-23: Improve filesystem structure. Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'DDK/KernelString.c')
-rw-r--r--DDK/KernelString.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/DDK/KernelString.c b/DDK/KernelString.c
new file mode 100644
index 00000000..1bd4c8c6
--- /dev/null
+++ b/DDK/KernelString.c
@@ -0,0 +1,34 @@
+/* -------------------------------------------
+
+ Copyright SoftwareLabs
+
+ Purpose: Kernel Strings.
+
+------------------------------------------- */
+
+#include <DDK/KernelString.h>
+
+DK_EXTERN size_t kernelStringLength(const char* str)
+{
+ size_t index = 0;
+
+ while (str[index] != 0)
+ {
+ ++index;
+ }
+
+ return index;
+}
+
+DK_EXTERN int kernelStringCopy(char* dst, const char* src, size_t len)
+{
+ size_t index = 0;
+
+ while (index != len)
+ {
+ dst[index] = src[index];
+ ++index;
+ }
+
+ return index;
+}