aboutsummaryrefslogtreecommitdiffstats
path: root/libft/src/ft_toupper.c
blob: 864ef703f46012b77cce44ff2b825020c1f591d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_toupper.c                                       :+:      :+:    :+:   */
/*                                                    +:+ +:+         +:+     */
/*   By: rbousset <marvin@42.fr>                    +#+  +:+       +#+        */
/*                                                +#+#+#+#+#+   +#+           */
/*   Created: 2020/02/14 17:07:16 by rbousset          #+#    #+#             */
/*   Updated: 2020/02/14 17:07:16 by rbousset         ###   ########lyon.fr   */
/*                                                                            */
/* ************************************************************************** */

static int
	ft_islower(int c)
{
	if (c >= 97 && c <= 122)
		return (1);
	return (0);
}

int
	ft_toupper(int c)
{
	if (ft_islower(c))
		return (c - 32);
	return (c);
}