-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathft_charcapifeven.c
20 lines (19 loc) · 1.05 KB
/
ft_charcapifeven.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_charcapifeven.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: erli <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/11/08 11:14:15 by erli #+# #+# */
/* Updated: 2018/11/08 11:16:29 by erli ### ########.fr */
/* */
/* ************************************************************************** */
char ft_charcapifeven(unsigned int i, char c)
{
if (i % 2 == 0 && c >= 'a' && c <= 'z')
return (c - 32);
if (i % 2 == 1 && c >= 'A' && c <= 'Z')
return (c + 32);
return (c);
}