text: /* ************************************************************************** */
  /*                                                                            */
  /*                                                        :::      ::::::::   */
  /*   ft_strlcpy.c                                       :+:      :+:    :+:   */
  /*                                                    +:+ +:+         +:+     */
  /*   By: phemsi-a <phemsi-a@student.42sp.org.br>    +#+  +:+       +#+        */
  /*                                                +#+#+#+#+#+   +#+           */
  /*   Created: 2021/02/03 21:31:25 by phemsi-a          #+#    #+#             */
  /*   Updated: 2021/02/15 11:12:00 by phemsi-a         ###   ########.fr       */
  /*                                                                            */
  /* ************************************************************************** */
  
  #include "libft.h"
  
  size_t	ft_strlcpy(char *dst, const char *src, size_t size)
  {
  	size_t	i;
  
  	if (!src)
  		return (0);
  	i = 0;
  	if (size > 0)
  	{
  		while ((src[i] != '\0') && (i < (size - 1)))
  		{
  			dst[i] = src[i];
  			i++;
  		}
  		dst[i] = '\0';
  	}
  	if (size == 0)
  		dst[ft_strlen(dst)] = '\0';
  	while (src[i] != '\0')
  	{
  		i++;
  	}
  	return (i);
  }
  