| 1 |
'\" t |
| 2 |
.\" Copyright 1993, David Metcalfe <[email protected]> |
| 3 |
.\" Copyright, the authors of the Linux man-pages project |
| 4 |
.\" |
| 5 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 6 |
.\" |
| 7 |
.TH strpbrk 3 2026-02-08 "Linux man-pages 6.18" |
| 8 |
.SH NAME |
| 9 |
strpbrk \- search a string for any of a set of bytes |
| 10 |
.SH LIBRARY |
| 11 |
Standard C library |
| 12 |
.RI ( libc ,\~ \-lc ) |
| 13 |
.SH SYNOPSIS |
| 14 |
.nf |
| 15 |
.B #include <string.h> |
| 16 |
.P |
| 17 |
.BI "char *strpbrk(const char *" s ", const char *" accept ); |
| 18 |
.fi |
| 19 |
.SH DESCRIPTION |
| 20 |
The |
| 21 |
.BR strpbrk () |
| 22 |
function locates the first occurrence in the |
| 23 |
string |
| 24 |
.I s |
| 25 |
of any of the bytes in the string |
| 26 |
.IR accept . |
| 27 |
.SH RETURN VALUE |
| 28 |
The |
| 29 |
.BR strpbrk () |
| 30 |
function returns a pointer to the byte in |
| 31 |
.I s |
| 32 |
that matches one of the bytes in |
| 33 |
.IR accept , |
| 34 |
or NULL |
| 35 |
if no such byte is found. |
| 36 |
.SH ATTRIBUTES |
| 37 |
For an explanation of the terms used in this section, see |
| 38 |
.BR attributes (7). |
| 39 |
.TS |
| 40 |
allbox; |
| 41 |
lbx lb lb |
| 42 |
l l l. |
| 43 |
Interface Attribute Value |
| 44 |
T{ |
| 45 |
.na |
| 46 |
.nh |
| 47 |
.BR strpbrk () |
| 48 |
T} Thread safety MT-Safe |
| 49 |
.TE |
| 50 |
.SH STANDARDS |
| 51 |
C11, POSIX.1-2008. |
| 52 |
.SH HISTORY |
| 53 |
POSIX.1-2001, C89, SVr4, 4.3BSD. |
| 54 |
.SH SEE ALSO |
| 55 |
.BR memchr (3), |
| 56 |
.BR strchr (3), |
| 57 |
.BR string (3), |
| 58 |
.BR strsep (3), |
| 59 |
.BR strspn (3), |
| 60 |
.BR strstr (3), |
| 61 |
.BR strtok (3), |
| 62 |
.BR wcspbrk (3) |