mirror of
https://github.com/guezoloic/libft.git
synced 2026-01-25 00:34:15 +00:00
feat: add ft_toupper function
This commit is contained in:
8
ft_toupper.c
Normal file
8
ft_toupper.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "libft.h"
|
||||
|
||||
int ft_toupper(int c)
|
||||
{
|
||||
if ('a' <= c && c <= 'z')
|
||||
c -= 32;
|
||||
return (c);
|
||||
}
|
||||
9
libft.h
9
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
|
||||
|
||||
Reference in New Issue
Block a user