summaryrefslogtreecommitdiffstats
path: root/src/b_sqb_str.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/b_sqb_str.c')
-rw-r--r--src/b_sqb_str.c17
1 files changed, 17 insertions, 0 deletions
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 <libft.h>
#include <stdint.h>
#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);
}