Ajout de la fonction srtcat et modification du 0 de la police de la Graph 90+E

This commit is contained in:
Antoine 2019-07-19 15:06:24 +02:00 committed by lephe
parent 62ae7e19d4
commit 8cbd5be038
2 changed files with 11 additions and 0 deletions

View file

@ -19,4 +19,7 @@ size_t strlen(char const *str);
/* strncpy(): Copy a string with a size limit*/
char *strncpy(char *dst, char const *src, size_t n);
/* strcat(): Concatenation of src in dest*/
char *strcat(char *dest, const char *src);
#endif /* GINT_STD_STRING */

View file

@ -19,3 +19,11 @@ GWEAK char *strncpy(char *dst, const char *src, size_t n)
while(i < n && (dst[i] = src[i])) i++;
return dst;
}
GWEAK char *strcat(char *dest, const char *src)
{
unsigned long fin_dest = strlen(dest);
unsigned int i;
for (i = 0 ; i <= strlen(src) ; i++) dest[fin_dest + i] = src[i];
return dest;
}