diff options
Diffstat (limited to 'src/lib/string.c')
-rw-r--r-- | src/lib/string.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/src/lib/string.c b/src/lib/string.c deleted file mode 100644 index c267c11d7..000000000 --- a/src/lib/string.c +++ /dev/null @@ -1,45 +0,0 @@ -#include <string.h> - -void* memset(void* s, int c, size_t n) -{ - char* _s = s; - while(n) - { - *_s = c; - _s++; n--; - } - return s; -} - -char* strcpy(char* d, const char* s) -{ - char* d1 = d; - - do - { - *d1 = *s; - if (*s == '\0') return d; - d1++; s++; - } while(1); -} - -int strcmp(const char* a, const char* b) -{ - while((*a != '\0') && (*b != '\0')) - { - if (*a == *b) - { - a++; b++; - } - else - { - return (*a > *b) ? 1 : -1; - } - } - if (*a == *b) - return 0; - if (*a == '\0') - return -1; - else - return 1; -} |