ffs, ffsl, ffsll - find first bit set in a word
#include <strings.h>
int ffs(int i);
#include <string.h>
int ffsl(long int i);
int ffsll(long long int i);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
These functions return the position of the first bit set, or 0 if no bits are set in i
.
For an explanation of the terms used in this section, see attributes(7).
Interface | Attribute | Value |
ffs(), ffsl(), ffsll() | Thread safety | MT-Safe |
BSD systems have a prototype in <string.h>
.
memchr(3)
This page is part of release 4.15 of the Linux man-pages
project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.