-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_strupcase.c
34 lines (31 loc) · 1.21 KB
/
ft_strupcase.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
30
31
32
33
34
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_strupcase.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: pix <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/02/18 03:59:45 by pix #+# #+# */
/* Updated: 2022/04/04 03:07:11 by pix ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
/**
* @brief Uppercase all occurence of lowercase in a string.
*
* @param str String value to convert
*
* @return (char *) Return converted value or NULL if error
*/
char *ft_strupcase(char *str)
{
char *tmp;
tmp = str;
while (*str)
{
if (*str >= 'a' && *str <= 'z')
*str ^= 32;
str++;
}
return (tmp);
}