-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strupper.c
29 lines (26 loc) · 1.1 KB
/
ft_strupper.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strupper.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: eleclet <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2015/12/12 14:18:41 by eleclet #+# #+# */
/* Updated: 2015/12/12 14:58:27 by eleclet ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char *ft_strupper(char *s)
{
char *ret;
int i;
i = 0;
ret = (char *)malloc(sizeof(*s) * ft_strlen(s) + 1);
while (s[i] != '\0')
{
ret[i] = ft_toupper(s[i]);
i++;
}
ret[i] = '\0';
return (ret);
}