Update: stdme/os module
This commit is contained in:
parent
dfb10f3390
commit
16f49181b5
37 changed files with 1201 additions and 345 deletions
33
stdme/src/os/process_inner.c
Normal file
33
stdme/src/os/process_inner.c
Normal 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="));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue