2023-10-25 13:56:45 +02:00
|
|
|
/* ************************************************************************** */
|
|
|
|
/* */
|
|
|
|
/* :::::::: */
|
2023-10-26 19:11:30 +02:00
|
|
|
/* ft_isxdigit.c :+: :+: */
|
2023-10-25 13:56:45 +02:00
|
|
|
/* +:+ */
|
|
|
|
/* By: djonker <marvin@codam.nl> +#+ */
|
|
|
|
/* +#+ */
|
|
|
|
/* Created: 2021/02/06 17:19:46 by djonker #+# #+# */
|
2023-10-26 19:11:30 +02:00
|
|
|
/* Updated: 2023/10/18 16:59:27 by houtworm ######## odam.nl */
|
2023-10-25 13:56:45 +02:00
|
|
|
/* */
|
|
|
|
/* ************************************************************************** */
|
|
|
|
|
|
|
|
#include "../libft.h"
|
|
|
|
|
|
|
|
int ft_isxdigit(char *str)
|
|
|
|
{
|
|
|
|
while (*str != '\0')
|
|
|
|
{
|
|
|
|
if ((*str >= 'a' && *str <= 'f') || (*str >= 'A' && *str <= 'F'))
|
|
|
|
str++;
|
|
|
|
else if (*str >= '0' && *str <= '9')
|
|
|
|
str++;
|
|
|
|
else
|
|
|
|
return (0);
|
|
|
|
}
|
|
|
|
return (1);
|
|
|
|
}
|