pushswap/libft/src/ft_strupp.c

30 lines
1.1 KiB
C
Raw Normal View History

2023-03-01 04:36:58 +01:00
/* ************************************************************************** */
/* */
/* :::::::: */
2023-03-07 05:42:47 +01:00
/* ft_strupp.c |o_o || | */
2023-03-01 04:36:58 +01:00
/* +:+ */
/* By: djonker <marvin@codam.nl> +#+ */
/* +#+ */
/* Created: 2021/01/31 05:49:38 by djonker #+# #+# */
2023-03-07 05:42:47 +01:00
/* Updated: 2023/03/05 20:46:08 by houtworm \___)=(___/ */
2023-03-01 04:36:58 +01:00
/* */
/* ************************************************************************** */
#include "../libft.h"
char *ft_strupp(char *s)
{
2023-03-07 05:42:47 +01:00
char *r;
2023-03-01 04:36:58 +01:00
int i;
i = 0;
2023-03-07 05:42:47 +01:00
r = ft_calloc(8 * (ft_strlen(s) + 1), 1);
2023-03-01 04:36:58 +01:00
while (s[i])
{
r[i] = ft_toupper(s[i]);
i++;
}
2023-03-07 05:42:47 +01:00
free(s);
return (r);
2023-03-01 04:36:58 +01:00
}