Normed most of the stdme

This commit is contained in:
Maieul BOYER 2024-07-10 18:06:10 +02:00
parent 882d5cb5bb
commit ac5458d42c
No known key found for this signature in database
31 changed files with 149 additions and 617 deletions

View file

@ -6,7 +6,7 @@
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/04 22:25:44 by maiboyer #+# #+# */
/* Updated: 2024/05/19 14:51:07 by maiboyer ### ########.fr */
/* Updated: 2024/07/10 18:05:03 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
@ -14,12 +14,12 @@
#include <stdbool.h>
#include <stdio.h>
bool find_null(const t_str *s)
bool find_null(const t_str *s)
{
return (s == NULL);
}
bool str_start_with(t_const_str s, t_const_str prefix)
bool str_start_with(t_const_str s, t_const_str prefix)
{
while (*prefix && *s)
{
@ -29,13 +29,13 @@ bool str_start_with(t_const_str s, t_const_str prefix)
return (*prefix == '\0');
}
bool find_path(const t_str *s)
bool find_path(const t_str *s)
{
t_str ss;
t_str ss;
if (*s == NULL)
return (false);
ss = *s;
return (ss[0] == 'P' && ss[1] == 'A' && ss[2] == 'T' && ss[3] == 'H' &&
return (ss[0] == 'P' && ss[1] == 'A' && ss[2] == 'T' && ss[3] == 'H' && \
ss[4] == '=');
}