maxishell
Implementation of a shell for Linux-like systems
Loading...
Searching...
No Matches
ft_count_bits.c File Reference

Go to the source code of this file.

Functions

int ft_count_bits (unsigned char current_char)
 

Function Documentation

◆ ft_count_bits()

int ft_count_bits ( unsigned char  current_char)

Definition at line 13 of file ft_count_bits.c.

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}