42_minishell/src/variables2.c
mcolonna 6862a1913b fix: export builtin and other things *
fix: parse_command: syntaxes like: "hello"'hello'hello
fix: export builtin: "NAME=VALUE" syntax
fix: variables can contain digits
add: variables_nameisvalid()
change: dev/valgrind.sh
2024-07-03 12:18:16 +02:00

24 lines
1.1 KiB
C

/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* variables2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mcolonna <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/07/02 15:39:55 by mcolonna #+# #+# */
/* Updated: 2024/07/02 15:41:42 by mcolonna ### ########.fr */
/* */
/* ************************************************************************** */
#include "include.h"
bool variables_nameisvalid(const char *name)
{
int i;
i = -1;
while (name[++i])
if (!char_isin(name[i], SYMBOL_CHARS))
return (false);
return (true);
}