Scroll to navigation

memmem(3) Library Functions Manual memmem(3)

NOMBRE

memmem - localiza una subcadena

BIBLIOTECA

Biblioteca Estándar C (libc-lc)

SINOPSIS

#define _GNU_SOURCE         /* Vea feature_test_macros(7) */
#include <string.h>
void *memmem(size_t hsize, size_t nsize;
             const void haystack[hsize], size_t hsize,
             const void needle[nsize], size_t nsize);

DESCRIPCIÓN

The memmem() function finds the start of the first occurrence of the substring needle of size nsize in the memory area haystack of size hsize.

VALOR DEVUELTO

La función memmem() devuelve un puntero al principio de la subcadena, o NULL si la subcadena no se encuentra.

ATRIBUTOS

Para obtener una explicación de los términos usados en esta sección, véase attributes(7).

Interfaz Atributo Valor
memmem() Seguridad del hilo Multi-hilo seguro

ESTÁNDARES

None.

HISTORIAL

musl libc 0.9.7; FreeBSD 6.0, OpenBSD 5.4, NetBSD, Illumos.

ERRORES

In glibc 2.0, if needle is empty, memmem() returns a pointer to the last byte of haystack. This is fixed in glibc 2.1.

VÉASE TAMBIÉN

bstring(3), strstr(3)

TRADUCCIÓN

La traducción al español de esta página del manual fue creada por Gerardo Aburruzaga García <gerardo.aburruzaga@uca.es> y Juan Piernas <piernas@ditec.um.es>

Esta traducción es documentación libre; lea la GNU General Public License Version 3 o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD.

Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a debian-l10n-spanish@lists.debian.org.

28 Junio 2025 Páginas de Manual de Linux (no publicadas)