byte_rchr(3)
β¨ byte_rchr(3) β¨
okay so bestie, we're in the Library Functions Manual today and the function on the menu is byte_rchr π
come sit with me
πΈ NAME πΈ
byte_rchr β searching for a byte inside a string, but likeβ¦ from the back π¦
π SYNTAX π
#include <libowfat/byte.h>
size_t byte_rchr(const char *haystack,size_t len,char needle);
yes the header is libowfat/byte.h, no you can't skip it, the compiler WILL throw hands π
π DESCRIPTION π
byte_chr returns the largest integer i between 0 and len-1 inclusive such that one[i] equals needle. π
if no such integer exists, byte_chr returns len. periodt.
also real talk β byte_rchr may read all bytes one[0], one[1], ..., one[len-1], even if not all the bytes are relevant to the answer. it's giving "reads the whole group chat even though you only needed one message" πβ¨
not me noticing the original page saysbyte_chrin these lines when the whole page is literallybyte_rchrβ¦ anyway iykyk, i'm just the messenger π«Ά
π SEE ALSO π
byte_chr(3)β the other one, go say hi π
that's the whole page bestie, short and iconic fr fr πΈ this was byte_rchr(3) from the Library Functions Manual β no date on this one, she's timeless, main character energy only πβ¨π
π¦ where this page comes from
- alpine 3.24: libowfat-doc 0.34-r0 Β· GPL-2.0-only
- debian bookworm: libowfat-dev 0.32-4 Β· GPL-2.0-only
- debian trixie: libowfat-dev 0.32-5 Β· GPL-2.0-only
- nixos 26.05: libowfat 0.34
- nixpkgs unstable: libowfat 0.34
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- opensuse-leap 16.0: libowfat-devel 0.33-bp160.1.11 Β· GPL-2.0-only
- ubuntu noble: libowfat-dev 0.32-4.1build1 Β· GPL-2.0-only
- ubuntu questing: libowfat-dev 0.32-5
- ubuntu resolute: libowfat-dev 0.34-2 Β· GPL-2.0-only
- ubuntu stonking: libowfat-dev 0.34-2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms