-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokens_identifier2.c
More file actions
30 lines (28 loc) · 1.18 KB
/
tokens_identifier2.c
File metadata and controls
30 lines (28 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* tokens_identifier2.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: aouchaad <aouchaad@student.1337.ma> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/06/22 17:44:43 by aouchaad #+# #+# */
/* Updated: 2023/06/22 17:46:03 by aouchaad ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int check_if_cotes_exist(t_variables *var, char *token)
{
var->i = 0;
var->j = 0;
var->len = 0;
while (token[var->i])
{
if (token[var->i] == '\'' || token[var->i] == '\"')
return (1);
var->i++;
}
var->i = 0;
while (token[var->i] && token[var->i] == ' ')
var->i++;
return (0);
}