/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* metacharacter.c :+: :+: :+: */ /* +:+ +:+ +:+ */ /* By: kcolin +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2025/02/06 15:23:31 by kcolin #+# #+# */ /* Updated: 2025/02/11 19:04:03 by kcolin ### ########.fr */ /* */ /* ************************************************************************** */ #include "metacharacter.h" // FIXME: use ft_strchr /* ** return true if the character is a metacharacter ** ** Bash reference manual: A character that, when unquoted, separates words. A ** metacharacter is a space, tab, newline, or one of the following characters: ** ‘|’, ‘&’, ‘(’, ‘)’, ‘<’, or ‘>’. */ bool is_metacharacter(char c) { if (c == ' ' || c == '\t' || c == '\n' || c == '|' || c == '&' || c == '(' || c == ')' || c == '<' || c == '>') return (true); return (false); }