diff --git a/ft_toupper.c b/ft_toupper.c new file mode 100644 index 0000000..2028de4 --- /dev/null +++ b/ft_toupper.c @@ -0,0 +1,8 @@ +#include "libft.h" + +int ft_toupper(int c) +{ + if ('a' <= c && c <= 'z') + c -= 32; + return (c); +} diff --git a/libft.h b/libft.h index 18c86f4..2260ad5 100644 --- a/libft.h +++ b/libft.h @@ -88,4 +88,13 @@ void *ft_memmove(void *dst, const void *src, size_t n); */ size_t ft_strlcpy(char *dst, const char *src, size_t dstsize); +// size_t ft_strlcat(char *dst, const char *src, size_t dstsize); + +/* + The toupper() function converts a + lower-case letter to the + corresponding upper-case letter. +*/ +int ft_toupper(int c); + #endif