-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathft_itoc.c
20 lines (18 loc) · 1.05 KB
/
ft_itoc.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_itoc.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: vbrazas <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/06/09 02:23:33 by vbrazas #+# #+# */
/* Updated: 2018/06/09 02:23:46 by vbrazas ### ########.fr */
/* */
/* ************************************************************************** */
#include "libft.h"
char ft_itoc(const unsigned char value, const bool is_upperсase)
{
if (value < 10)
return (value + '0');
return (value - 10 + (is_upperсase ? 'A' : 'a'));
}