aboutsummaryrefslogtreecommitdiff
path: root/ft_tolower.c
blob: a6f5119a4a60a901897f486e03f66b495880c28d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
int ft_tolower(int c)
{
    if (c < -1)
         return (c + 256);
    if (c == -1)
        return (-1);
    if (c == 0)
        return (0);
    if (c >= 'A' && c <= 'Z')
        return ('a' + c - 'A');
    return (c);
}