ft_strcat.c 1.1 KB

1234567891011121314151617181920212223242526
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_strcat.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: mazimi <mazimi@student.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2014/11/21 11:40:49 by mazimi #+# #+# */
  9. /* Updated: 2014/12/26 18:11:07 by mazimi ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "../libft.h"
  13. char *ft_strcat(char *dest, const char *src)
  14. {
  15. int i;
  16. int j;
  17. j = 0;
  18. i = ft_strlen(dest);
  19. while (src[j])
  20. dest[i++] = src[j++];
  21. dest[i] = '\0';
  22. return ((char *)dest);
  23. }