diff options
Diffstat (limited to 'src/lib/string.c')
-rw-r--r-- | src/lib/string.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/string.c b/src/lib/string.c index fb4d435ae..eb8fe3d1c 100644 --- a/src/lib/string.c +++ b/src/lib/string.c @@ -10,6 +10,18 @@ void* memset(void* s, int c, size_t n) } } +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')) |