blob: f201470b5b0b44cd8db051585c58bca2352f37c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_todigit.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/15 10:37:57 by cacharle #+# #+# */
/* Updated: 2020/02/12 23:11:55 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_todigit(int c)
{
if (!ft_isdigit(c))
return (-1);
return (c & 0x0F);
}
|