wordsplit: handle operators

This commit is contained in:
Khaïs COLIN 2025-02-17 16:14:14 +01:00
parent 558ddb4096
commit f92763e479
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
7 changed files with 200 additions and 15 deletions

View file

@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* operator_start.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/17 16:21:03 by khais #+# #+# */
/* Updated: 2025/02/17 16:22:40 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
#include <stdbool.h>
/*
** Is the character the start of an operator?
*/
bool is_operator_start(char c)
{
if (ft_strchr("<>|&()", c) != NULL)
return (true);
else
return (false);
}