feat(convert/atou): adding the skip of the whitespace at the start
- Wasn't using the function isspace :).
This commit is contained in:
parent
1266f5d7e8
commit
94d1de557f
1 changed files with 3 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: rparodi <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2023/11/08 17:22:41 by rparodi #+# #+# */
|
/* Created: 2023/11/08 17:22:41 by rparodi #+# #+# */
|
||||||
/* Updated: 2025/09/08 10:16:01 by rparodi ### ########.fr */
|
/* Updated: 2025/09/12 15:24:43 by rparodi ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -26,6 +26,8 @@ size_t ft_atou(const char *nptr)
|
||||||
|
|
||||||
if (!nptr)
|
if (!nptr)
|
||||||
return (0);
|
return (0);
|
||||||
|
while (ft_check_space(nptr[i]))
|
||||||
|
i++;
|
||||||
i = 0;
|
i = 0;
|
||||||
number = 0;
|
number = 0;
|
||||||
while (nptr[i])
|
while (nptr[i])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue