From 76748544fde8c95125ff0b40643f8e2720fe9308 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Wed, 26 Aug 2020 17:09:43 +0200 Subject: Strings comp done --- src/b_sqb_str.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/b_sqb_str.c') diff --git a/src/b_sqb_str.c b/src/b_sqb_str.c index 0b23d7b..7c6a160 100644 --- a/src/b_sqb_str.c +++ b/src/b_sqb_str.c @@ -10,10 +10,25 @@ /* */ /* ************************************************************************** */ +#include #include #include "d_define.h" +static t_bool + b_sqb_str_comp(uint8_t id, + const char s_one[], + const char s_two[]) +{ + if (id == FT_ID_SQB_EQUA && + ft_strncmp(s_one, s_two, ft_strlen(s_one) + 1) == 0) + return (TRUE); + else if (id == FT_ID_SQB_EQUA && + ft_strncmp(s_one, s_two, ft_strlen(s_one) + 1) != 0) + return (TRUE); + return (FALSE); +} + uint8_t b_sqb_str(uint8_t id, char *argv[]) @@ -25,5 +40,7 @@ uint8_t else return (1); } + if (b_sqb_str_comp(id, argv[0], argv[2]) == TRUE) + return (0); return (1); } -- cgit v1.2.3