X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/bd20f8f47847787e1f3e933043933272908c5beb..ca363c2348145c3c7e67d27aa9a64ff065459d55:/armsrc/string.c diff --git a/armsrc/string.c b/armsrc/string.c index 4e66c95b..cc71276c 100644 --- a/armsrc/string.c +++ b/armsrc/string.c @@ -69,3 +69,47 @@ char* strncat(char *dest, const char *src, unsigned int n) return dest; } + +char* strcat(char *dest, const char *src) +{ + unsigned int dest_len = strlen(dest); + unsigned int i; + + for (i = 0 ; src[i] != '\0' ; i++) + dest[dest_len + i] = src[i]; + dest[dest_len + i] = '\0'; + + return dest; +} +////////////////////////////////////////// code to do 'itoa' + +/* reverse: reverse string s in place */ +void strreverse(char s[]) +{ + int c, i, j; + + for (i = 0, j = strlen(s)-1; i 0); /* delete it */ + if (sign < 0) + s[i++] = '-'; + s[i] = '\0'; + strreverse(s); +} + +//////////////////////////////////////// END 'itoa' CODE