text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strlcat.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: amsenhaj <marvin@42.fr>                    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2021/11/02 09:54:07 by amsenhaj          #+#    #+#             */
  /*   Updated: 2021/11/07 10:08:08 by amsenhaj         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  #include"libft.h"
  
  size_t	ft_strlcat(char *dest, const char *src, size_t size)
  {
  	size_t	i;
  	size_t	j;
  
  	i = -1;
  	while (++i < size && *dest)
  		dest++;
  	if (i == size)
  		return (i + ft_strlen(src));
  	j = -1;
  	while (src[++j])
  		if (j < size - i - 1)
  			*dest++ = src[j];
  	*dest = 0;
  	return (i + j);
  }
  