| 1 |
'\" t |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH streq 3 2026-02-25 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
streq \- strings equal |
| 9 |
.SH LIBRARY |
| 10 |
gnulib \- The GNU Portability Library |
| 11 |
.SH SYNOPSIS |
| 12 |
.nf |
| 13 |
.B #include <string.h> |
| 14 |
.P |
| 15 |
.BI "bool streq(const char *" s1 ", const char *" s2 ); |
| 16 |
.fi |
| 17 |
.SH DESCRIPTION |
| 18 |
.BR streq () |
| 19 |
determines whether the strings |
| 20 |
.I s1 |
| 21 |
and |
| 22 |
.I s2 |
| 23 |
are equal. |
| 24 |
.P |
| 25 |
It is equivalent to |
| 26 |
.P |
| 27 |
.in +4n |
| 28 |
.EX |
| 29 |
strcmp(s1, s2) == 0 |
| 30 |
.EE |
| 31 |
.in |
| 32 |
.SH RETURN VALUE |
| 33 |
.BR streq () |
| 34 |
returns true if and only if the strings |
| 35 |
.I s1 |
| 36 |
and |
| 37 |
.I s2 |
| 38 |
are equal. |
| 39 |
.SH ATTRIBUTES |
| 40 |
For an explanation of the terms used in this section, see |
| 41 |
.BR attributes (7). |
| 42 |
.TS |
| 43 |
allbox; |
| 44 |
lbx lb lb |
| 45 |
l l l. |
| 46 |
Interface Attribute Value |
| 47 |
T{ |
| 48 |
.na |
| 49 |
.nh |
| 50 |
.BR streq () |
| 51 |
T} Thread safety MT-Safe |
| 52 |
.TE |
| 53 |
.SH STANDARDS |
| 54 |
GNU. |
| 55 |
.SH HISTORY |
| 56 |
gnulib 202601. |
| 57 |
.SH SEE ALSO |
| 58 |
.BR memeq (3), |
| 59 |
.BR strcmp (3), |
| 60 |
.BR string (3) |