Update: stdme/os module

This commit is contained in:
Maieul BOYER 2024-04-29 15:12:51 +02:00
parent dfb10f3390
commit 16f49181b5
No known key found for this signature in database
37 changed files with 1201 additions and 345 deletions

View file

@ -0,0 +1,33 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* process_inner.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/01/04 22:25:44 by maiboyer #+# #+# */
/* Updated: 2024/01/04 22:26:10 by maiboyer ### ########.fr */
/* */
/* ************************************************************************** */
#include "me/types.h"
bool find_null(const t_str *s)
{
return (s == NULL);
}
bool str_start_with(t_const_str s, t_const_str prefix)
{
while (*prefix && *s)
{
if (*prefix++ != *s++)
return (false);
}
return (*prefix == '\0');
}
bool find_path(const t_str *s)
{
return (str_start_with(*s, "PATH="));
}