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

pull/7/head
Antoine 3 years ago committed by lephe
parent 62ae7e19d4
commit 8cbd5be038
  1. 3
      include/gint/std/string.h
  2. 8
      src/std/string.c

@ -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 */

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

Loading…
Cancel
Save