invalid maps

This commit is contained in:
Mthandazo Ndhlovu
2019-04-02 15:09:43 +02:00
parent 4e2fc9f19e
commit 1abb3fc566
127 changed files with 4946 additions and 131 deletions

View File

@@ -0,0 +1,27 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strlcat.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/04/08 14:32:30 by tmaze #+# #+# */
/* Updated: 2019/03/16 15:45:42 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
size_t ft_strlcat(char *dest, const char *src, size_t size)
{
int dest_len;
dest_len = ft_strlen(dest);
if ((size_t)dest_len < size)
{
ft_strncpy(&dest[dest_len], src, size - dest_len);
dest[size - 1] = '\0';
}
return (((size_t)dest_len < size) ? (size_t)(dest_len + ft_strlen(src))
: size + (size_t)ft_strlen(src));
}