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
parent 705854da39
commit 545b9ec635
3 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 */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

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;
}