blob: 52e71e0fa692ed98fb6d557790b70e7d20fc0b14 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
/* -------------------------------------------
Copyright ZKA Technologies
Purpose: Kernel Strings.
------------------------------------------- */
#include <DDK/KernelString.h>
DK_EXTERN size_t kernelStringLength(const char* in)
{
if (in == nil)
return 0;
if (*in == 0)
return 0;
size_t index = 0;
while (in[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;
}
|