STDC_TRAILING_ZEROS(3)

πŸ“¦ version 15.1, in freebsd 15.1

πŸ¦‹ stdc_trailing_zeros(3) πŸ¦‹

okay so bestie, you found the Library Functions Manual page for stdc_trailing_zeros(3) β€” and honestly it’s giving β€œtiny utility, big main character energy.” πŸ’…


πŸŽ€ NAME πŸŽ€

stdc_trailing_zeros β€” find the number of trailing zeros in an integer ✨

✨ SYNOPSIS ✨

Standard C Library (libc, -lc) #include <stdbit.h>

unsigned int
stdc_trailing_zeros_uc(unsigned char value);

unsigned int
stdc_trailing_zeros_us(unsigned short value);

unsigned int
stdc_trailing_zeros_ui(unsigned int value);

unsigned int
stdc_trailing_zeros_ul(unsigned long value);

unsigned int
stdc_trailing_zeros_ull(unsigned long long value);

unsigned int
stdc_trailing_zeros(value);

πŸ’– DESCRIPTION πŸ’–

The stdc_trailing_zeros_type() family of functions returns the number of trailing zeros in value, where value is of type unsigned char, unsigned short, unsigned int, unsigned long, or unsigned long long for type being uc, us, ui, ul, or ull respectively. 🫢

The stdc_trailing_zeros(value) type-generic macro picks the appropriate stdc_trailing_zeros_type() function based on the type of value. It’s literally matching the vibe of your argument for you, no cap. πŸ”₯

🌈 RETURN VALUES 🌈

Returns the number of trailing zeros in value. If value is all zeros, the total number of bits in the type of value is returned. Slay. ✨

πŸ¦‹ SEE ALSO πŸ¦‹

πŸ’œ STANDARDS πŸ’œ

The stdc_trailing_zeros_type() family of functions and the stdc_trailing_zeros() type-generic macro conform to . 🫧

πŸ•°οΈ HISTORY πŸ•°οΈ

The stdc_trailing_zeros_type() family of functions and the stdc_trailing_zeros() type-generic macro were added in FreeBSD 15.1. πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

Robert Clausecker <fuz@FreeBSD.org> πŸ’Œ

xoxo bestie πŸ’– β€” this page is from Debian, dated November 9, 2025, and it lives under STDC_TRAILING_ZEROS(3). periodt. ✨

πŸ“¦ where this page comes from
  • freebsd 15.1: base 15.1
  • πŸ“œ the page's license: BSD-2-Clause
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms