dwww Home | Manual pages | Find package

strchr(3)                  Library Functions Manual                  strchr(3)

NOM
       strchr, strrchr, strchrnul - Rechercher un caractère dans une chaîne

BIBLIOTHÈQUE
       Bibliothèque C standard (libc, -lc)

SYNOPSIS
       #include <string.h>

       char *strchr(const char *s, int c);
       char *strrchr(const char *s, int c);

       #define _GNU_SOURCE         /* Consultez feature_test_macros(7) */
       #include <string.h>

       char *strchrnul(const char *s, int c);

DESCRIPTION
       La  fonction strchr() renvoie un pointeur sur la première occurrence du
       caractère c dans la chaîne s.

       La fonction strrchr() renvoie un pointeur sur la dernière occurrence du
       caractère c dans la chaîne s.

       La  fonction  strchrnul()  est  comme strchr(), sauf que si c n'est pas
       trouvé dans s, alors elle retourne un pointeur sur l'octet  NULL  à  la
       fin de s, au lieu de NULL.

       Pour   ces  fonctions,  « caractère »  signifie  « octet » ;  elles  ne
       marchent pas avec des caractères larges ou multioctets.

VALEUR RENVOYÉE
       The strchr()  and strrchr()  functions return a pointer to the  matched
       character  or  NULL if the character is not found. The terminating null
       byte is considered part of the string, so that if  c  is  specified  as
       '\0', these functions return a pointer to the terminator.

       La fonction strchrnul() renvoie un pointeur sur le caractère correspon-
       dant, ou  un  pointeur  sur  l'octet  NULL  terminant  s  (c'est-à-dire
       s + strlen(s)) si le caractère n'a pas été trouvé.

VERSIONS
       strchrnul()  was added in glibc 2.1.1.

ATTRIBUTS
       Pour  une explication des termes utilisés dans cette section, consulter
       attributes(7).

       ┌─────────────────────────────────────┬──────────────────────┬─────────┐
       │InterfaceAttributValeur  │
       ├─────────────────────────────────────┼──────────────────────┼─────────┤
       │strchr(), strrchr(), strchrnul()     │ Sécurité des threads │ MT-Safe │
       └─────────────────────────────────────┴──────────────────────┴─────────┘

STANDARDS
       strchr(), strrchr(): POSIX.1-2001, POSIX.1-2008, C99, SVr4, 4.3BSD.

       strchrnul() est une extension GNU.

VOIR AUSSI
       memchr(3),  string(3),  strlen(3),  strpbrk(3),  strsep(3),  strspn(3),
       strstr(3), strtok(3), wcschr(3), wcsrchr(3)

TRADUCTION
       La  traduction française de cette page de manuel a été créée par Chris-
       tophe Blaess <https://www.blaess.fr/christophe/>, Stéphan  Rafin  <ste-
       phan.rafin@laposte.net>, Thierry Vignaud <tvignaud@mandriva.com>, Fran-
       çois Micaux, Alain Portal <aportal@univ-montp2.fr>, Jean-Philippe  Gué-
       rard  <fevrier@tigreraye.org>,  Jean-Luc  Coulon (f5ibh) <jean-luc.cou-
       lon@wanadoo.fr>, Julien Cristau <jcristau@debian.org>,  Thomas  Huriaux
       <thomas.huriaux@gmail.com>,  Nicolas François <nicolas.francois@centra-
       liens.net>, Florentin Duneau <fduneau@gmail.com>, Simon  Paillard  <si-
       mon.paillard@resel.enst-bretagne.fr>,    Denis   Barbier   <barbier@de-
       bian.org>, David Prévot <david@tilapin.org>, Frédéric  Hantrais  <fhan-
       trais@gmail.com> et Grégoire Scano <gregoire.scano@malloc.fr>

       Cette traduction est une documentation libre ; veuillez vous reporter à
       la       GNU       General       Public        License        version 3
       ⟨https://www.gnu.org/licenses/gpl-3.0.html⟩  concernant  les conditions
       de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE.

       Si vous découvrez un bogue dans la traduction de cette page de  manuel,
       veuillez envoyer un message à ⟨debian-l10n-french@lists.debian.org⟩.

Pages du manuel de Linux 6.03   5 février 2023                       strchr(3)

Generated by dwww version 1.15 on Sat Jun 29 01:37:11 CEST 2024.