aboutsummaryrefslogtreecommitdiff
path: root/ft_toupper.c
blob: 2832c28fdfe25c7d8942ad812f5fc44a762b1931 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "libft.h"

int ft_toupper(int c)
{
    if (c < -1)
         return (c + 256);
    if (c == -1)
        return (-1);
    if (c == 0)
        return (0);
    if (c >= 'a' && c <= 'z')
        return (c - 'a' + 'A');
    return (c);
}