diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-05-27 20:45:46 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-05-27 20:45:46 +0200 |
| commit | 9db58da40cfcb6643412bfae25aefc0cd1077f9d (patch) | |
| tree | c6664fc649968ca1be7ddc59dfe3e9a7dd0f3ebc /DriverKit/KernelString.c | |
| parent | ce84bea215424ff36a2c18cab67835edfa8f71b5 (diff) | |
MHR-23: Improve project structure, make it better.
Signed-off-by: Amlal El Mahrouss <amlal@el-mahrouss-logic.com>
Diffstat (limited to 'DriverKit/KernelString.c')
| -rw-r--r-- | DriverKit/KernelString.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/DriverKit/KernelString.c b/DriverKit/KernelString.c new file mode 100644 index 00000000..6f28f4d8 --- /dev/null +++ b/DriverKit/KernelString.c @@ -0,0 +1,34 @@ +/* ------------------------------------------- + + Copyright SoftwareLabs + + Purpose: Kernel Strings. + +------------------------------------------- */ + +#include <DriverKit/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; +} |
