maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_count_bits.c
Go to the documentation of this file.
1
/* ************************************************************************** */
2
/* */
3
/* ::: :::::::: */
4
/* ft_count_bits.c :+: :+: :+: */
5
/* +:+ +:+ +:+ */
6
/* By: rmikhayl <marvin@42.fr> +#+ +:+ +#+ */
7
/* +#+#+#+#+#+ +#+ */
8
/* Created: 2024/04/19 16:57:36 by rmikhayl #+# #+# */
9
/* Updated: 2024/04/19 17:00:08 by rmikhayl ### ########.fr */
10
/* */
11
/* ************************************************************************** */
12
13
int
ft_count_bits
(
unsigned
char
current_char)
14
{
15
int
i;
16
17
i = 0;
18
while
(current_char)
19
{
20
i += 1;
21
current_char >>= 1;
22
}
23
return
(i);
24
}
ft_count_bits
int ft_count_bits(unsigned char current_char)
Definition
ft_count_bits.c:13
lib
libft
src
ft_count_bits.c
Generated by
1.9.8