moved env functions to libft
This commit is contained in:
23
libft/srcs/ft_envgetelem.c
Normal file
23
libft/srcs/ft_envgetelem.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ft_envgetelem.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2019/12/05 16:46:17 by tmaze #+# #+# */
|
||||
/* Updated: 2019/12/05 16:47:00 by tmaze ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "libft.h"
|
||||
|
||||
t_env *ft_envgetelem(char *key, t_env *env)
|
||||
{
|
||||
t_env *it;
|
||||
|
||||
it = env;
|
||||
while (it && !ft_strequ(it->key, key))
|
||||
it = it->next;
|
||||
return (it);
|
||||
}
|
Reference in New Issue
Block a user