feat: add ft_toupper function

This commit is contained in:
2025-10-05 22:00:14 +02:00
parent 3e543ced2f
commit b4d1a32d65
2 changed files with 17 additions and 0 deletions

8
ft_toupper.c Normal file
View File

@@ -0,0 +1,8 @@
#include "libft.h"
int ft_toupper(int c)
{
if ('a' <= c && c <= 'z')
c -= 32;
return (c);
}

View File

@@ -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_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 #endif