-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathskip_quotes.c
33 lines (30 loc) · 1.08 KB
/
skip_quotes.c
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
31
32
33
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* skip_quotes.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: lalex-ku <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/06/28 18:31:52 by lalex-ku #+# #+# */
/* Updated: 2022/06/28 18:31:58 by lalex-ku ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
int skip_quotes(char *str)
{
int i;
i = 0;
if (str[i] == '\'')
{
i++;
while (str[i] != '\'')
i++;
}
if (str[i] == '"')
{
i++;
while (str[i] != '"')
i++;
}
return (i);
}