diff options
| author | Michal Idziorek <m.i@gmx.at> | 2015-05-18 00:48:07 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2015-05-18 00:48:07 +0200 |
| commit | db22b587966b4a4eaa47536f32ca812532446bcb (patch) | |
| tree | b6d471f5232973713ef64d9c81feefef51ee5eaf /xxx/lib/string | |
| parent | 042e25e19b5fc0cec1d47440c26246c886cf39f6 (diff) | |
heavy refactoring underway
Diffstat (limited to 'xxx/lib/string')
| -rw-r--r-- | xxx/lib/string/string.c | 37 | ||||
| -rw-r--r-- | xxx/lib/string/string.h | 3 |
2 files changed, 0 insertions, 40 deletions
diff --git a/xxx/lib/string/string.c b/xxx/lib/string/string.c deleted file mode 100644 index 729c509..0000000 --- a/xxx/lib/string/string.c +++ /dev/null @@ -1,37 +0,0 @@ -#include <stdbool.h> - -//length 0 for null terminated strings; -bool strcmp(char *str1, char *str2, int length) -{ - int i=0; - while(true) - { - if(str1[i]!=str2[i])return false; - i++; - - if(i==length) return true; - if(str1[i]==0||str2[i]==0) - { - if(str1[i]==str2[i])return true; - return false; - } - } - -} - -void* memcpy(void* restrict dstptr, const void* restrict srcptr, int size) -{ - unsigned char* dst = (unsigned char*) dstptr; - const unsigned char* src = (const unsigned char*) srcptr; - for ( int i = 0; i < size; i++ ) - dst[i] = src[i]; - return dstptr; -} - -int strlen(const char* string) -{ - int result = 0; - while ( string[result] ) - result++; - return result; -} diff --git a/xxx/lib/string/string.h b/xxx/lib/string/string.h deleted file mode 100644 index a804de9..0000000 --- a/xxx/lib/string/string.h +++ /dev/null @@ -1,3 +0,0 @@ -#include <stdbool.h> -bool strcmp(char *str1, char *str2, int length); -void* memcpy(void* restrict dstptr, const void* restrict srcptr, int size); |
