From db8fdf78dd9786ea1d989ad52eedb0c0fbaea1b7 Mon Sep 17 00:00:00 2001 From: Vadim Tolmachev Date: Thu, 14 Oct 2021 01:15:51 +0300 Subject: [PATCH] add functions --- functions/ft_split.c | 104 +++++++++++++++++++++++++++++++++++++++++ functions/ft_strdup.c | 31 ++++++++++++ functions/ft_strjoin.c | 39 ++++++++++++++++ functions/ft_strncmp.c | 26 +++++++++++ 4 files changed, 200 insertions(+) create mode 100644 functions/ft_split.c create mode 100644 functions/ft_strdup.c create mode 100644 functions/ft_strjoin.c create mode 100644 functions/ft_strncmp.c diff --git a/functions/ft_split.c b/functions/ft_split.c new file mode 100644 index 0000000..78bcbaa --- /dev/null +++ b/functions/ft_split.c @@ -0,0 +1,104 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_split.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: bcaffere 0)) + { + if (*s1 != *s2) + return ((unsigned char)*s1 - (unsigned char)*s2); + s1++; + s2++; + n--; + } + return (0); +}