summaryrefslogtreecommitdiff
path: root/Source/Kernel/Core/CMem.ns.cpp
blob: c2129ec7d7f094e8f73e8d659777308fdfa438fc (plain) (blame)
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
#include <Core/common.wtf.h>

namespace CMem {

//Standard C functions
u8int *memcpy(u8int *dest, const u8int *src, int count) {
	for (int i = 0; i < count; i++) {
		dest[i] = src[i];
	}
	return dest;
}

u8int *memset(u8int *dest, u8int val, int count) {
	for (int i = 0; i < count; i++) {
		dest[i] = val;
	}
	return dest;
}

u16int *memsetw(u16int *dest, u16int val, int count) {
	for (int i = 0; i < count; i++) {
		dest[i] = val;
	}
	return dest;
}

u32int strlen(const char *str) {
	u32int i = 0;
	while (str[i]) {
		i++;
	}
	return i;
}

}