42_libft/ft_toupper.c

19 lines
990 B
C
Raw Normal View History

2022-09-27 10:29:23 -04:00
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_toupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/09/26 12:38:07 by cchauvet #+# #+# */
2022-10-04 08:21:55 -04:00
/* Updated: 2022/09/28 15:08:58 by cchauvet ### ########.fr */
2022-09-27 10:29:23 -04:00
/* */
/* ************************************************************************** */
#include "libft.h"
int ft_toupper(int c)
{
2022-10-04 08:21:55 -04:00
return (c + ('A' - 'a') * (c >= 'a' && 'z' >= c));
2022-09-27 10:29:23 -04:00
}