Update so '$BANANE=truc' works
This commit is contained in:
parent
ecf01a6b8b
commit
11ec5cfa3c
14 changed files with 183 additions and 120 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/11/04 17:29:13 by maiboyer #+# #+# */
|
||||
/* Updated: 2023/12/09 14:47:43 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/08/12 16:05:13 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -16,6 +16,8 @@ char *str_find_chr(t_const_str str, char chr)
|
|||
{
|
||||
t_usize index;
|
||||
|
||||
if (str == NULL)
|
||||
return (NULL);
|
||||
index = 0;
|
||||
while (str[index])
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
/* By: maiboyer <maiboyer@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2023/08/10 11:11:01 by maiboyer #+# #+# */
|
||||
/* Updated: 2023/12/09 16:53:53 by maiboyer ### ########.fr */
|
||||
/* Updated: 2024/08/12 16:05:30 by maiboyer ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -17,6 +17,8 @@ const char *str_find_str(t_const_str str, t_const_str to_find)
|
|||
t_str needle;
|
||||
t_str haystack;
|
||||
|
||||
if (str == NULL || to_find == NULL)
|
||||
return (NULL);
|
||||
if (*to_find == '\0')
|
||||
return (str);
|
||||
while (*str)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue