aboutsummaryrefslogtreecommitdiff
path: root/src/ft_isascii.c
blob: 51dcd1cd3fbc14ebf626379bcf34384d9f2f6c59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_isascii.c                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: cacharle <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2019/10/07 09:54:30 by cacharle          #+#    #+#             */
/*   Updated: 2019/10/20 13:03:23 by cacharle         ###   ########.fr       */
/*                                                                            */
/* ************************************************************************** */

#define MAX_CHAR ((1 << 7) - 1)

int	ft_isascii(int c)
{
	return (c >= 0 && c <= MAX_CHAR);
}