ft_tolower

Subject

TOLOWER(3) (simplified)

NAME
    tolower -- upper case to lower case letter conversion
SYNOPSIS
    int tolower(int c);
DESCRIPTION
    The tolower() function converts an upper-case letter to the corresponding lower-case letter. The argument must be representable as an unsigned char or the value of EOF.
RETURN VALUES
    If the argument is an upper-case letter, the tolower() function returns the corresponding lower-case letter if there is one; otherwise, the argument is returned unchanged.

Understandable explanation

I don't think I'll need to explain with more details what this function does, the man is pretty self-explanatory on this point.

Hints

ft_tolower.c
int    ft_tolower(int c)
{
    if (/* c is an upper-case letter */)
        return (/* corresponding lower-case letter */);
    return (c);
}

Commented solution

ft_tolower

Last updated

Was this helpful?