STRPBRK(3P)

πŸ¦‹ PROLOG πŸ¦‹

okay so before we even get into it β€” this manual page is part of the POSIX Programmer's Manual, bestie. the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior), or honestly the interface might not even be implemented on Linux at all. πŸ’€


✨ NAME ✨

strpbrk β€” scan a string for a byte


πŸŽ€ SYNOPSIS πŸŽ€

#include <string.h>

char *strpbrk(const char *s1, const char *s2);

πŸ’– DESCRIPTION πŸ’–

so the functionality described on this reference page is aligned with the ISO C standard. and like, any conflict between the requirements described here and the ISO C standard? completely unintentional, no cap. this volume of POSIX.1‐2017 defers to the ISO C standard, periodt.

now the actual tea: strpbrk() shall locate the first occurrence in the string pointed to by s1 of any byte from the string pointed to by s2. it's giving "find me the moment these two strings finally meet" energy. 🫢


🌸 RETURN VALUE 🌸

upon successful completion, strpbrk() shall return a pointer to that byte πŸ‘‘ β€” or a null pointer if no byte from s2 occurs in s1 at all. (sad, but valid.)


πŸ’… ERRORS πŸ’…

no errors are defined. iconic behavior honestly, she simply does not fail.

the following sections are informative.


🌈 EXAMPLES 🌈

None. (yes bestie, literally none, we move.)


πŸ¦‹ APPLICATION USAGE πŸ¦‹

None.


⭐ RATIONALE ⭐

None.


🧚 FUTURE DIRECTIONS 🧚

None.


πŸ”₯ SEE ALSO πŸ”₯

  • strchr()
  • strrchr()

also: the Base Definitions volume of POSIX.1‐2017, <string.h>


portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group.

in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. no arguing with the referee, that's the rule. 🚨

the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .

any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .


okay that's the whole page, we ate and left no crumbs πŸ’…βœ¨ this was IEEE/The Open Group, 2017, and the page is STRPBRK(3P) β€” mwah, bye bestie πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from